How to Exclude an Event From the Conversion API
Cometly's Conversion API (CAPI) sends the conversions you track to your ad platforms server-to-server. Sometimes an event should stay in Cometly only: the visitor opted out of data sharing under CCPA, their browser sent a Global Privacy Control (GPC) signal, or they declined your cookie banner. For those cases Cometly supports a per-event flag, do_not_capi.
When the flag is set on an event, Cometly records it exactly as usual, so attribution, reports, revenue and the contact's journey are unaffected, and the event is never forwarded to any ad platform. You tag the events you already send; there is no need to create a duplicate event.
Note: The flag applies to every Conversion API destination in your space (Meta, Google, TikTok, LinkedIn, Microsoft, Reddit, X and the others). It cannot exclude one platform and keep another. The data-sharing mode and event rules on the Conversion API page control which event types are sent at all; do_not_capi controls individual events.
Disclaimer: This article is for informational purposes only and is not legal advice. Per our Terms of Service, you are responsible for complying with the privacy laws that apply to you and for deciding which events may be shared with ad platforms.
How it works
Your site or system decides whether the person has opted out of ad data sharing.
You send the event to Cometly with
do_not_capiset totrue.Cometly stores the conversion and skips the Conversion API for that event only. Every other event is sent according to your Conversion API settings.
The flag is checked on every event, so a person who opts out today and opts back in next month is handled correctly each time.
Option 1: Cometly API
Add do_not_capi to the event payload. Set it to true to keep the event in Cometly only; set it to false or leave it out to send the event as usual. The field is accepted on POST /public-api/v1/events/track and on the original POST /public-api/v1/events endpoint.
{ "event_name": "purchase", "email": "jane@example.com", "amount": 149.00, "do_not_capi": true }⚠️ Important: Send a JSON boolean (true / false) or the numbers 1 / 0. Do not send the text "false" in quotes: any non-empty text counts as set, so the event would be kept out of the Conversion API.
Full field reference: Create Event in the developer docs.
Option 2: Webhooks
If the app sending the webhook includes the person's consent decision in its payload, map it to Cometly's flag.
Open the webhook event in Cometly and go to the Mapping step.
Click Add Field and select Do Not Send via Conversion API.
Map it to the property in your payload that says whether the person opted out, or choose Fixed Value to apply the same setting to every event this webhook receives.
Click Save & Continue.
Cometly reads the mapped value as follows:
Value received | Result |
| Kept in Cometly only, not sent to the Conversion API |
| Sent to the Conversion API as usual |
Property missing from the payload | Sent to the Conversion API as usual |
Anything else | Kept in Cometly only. An unexpected value never shares data. |
Values are matched regardless of capitalisation, so TRUE and Yes work too.
💡 Tip: If your payload carries consent the other way round (for example consent_given: true means the person agreed to sharing), add the Invert true/false value formatter to the mapping. If the decision depends on several fields, such as a state and a GPC flag, use the Set value by condition formatter to set the flag by rule.
New to webhooks? See Cometly Webhooks Integration.
Option 3: Conversions added manually
When you add a conversion to a contact by hand from their profile page, tick Do not send event via Conversion API before saving.
Browser pixel events
Events fired by the Cometly pixel in the browser can't carry this flag yet. If you track conversions with the pixel and need to honour an opt-out, either send those conversions server-side through the API or a webhook with the flag set, or block the pixel until the person consents, as described in Ensure Cometly Only Tracks After Consent.
Verify it's working
The event still appears in Cometly: in the Event Log for API and webhook events, and in the contact's journey.
The event does not appear in the ad platform, for example in Meta Events Manager or in your Google Ads conversion action.
Good to know
Per event, not per contact. The flag affects only the event it is set on. Other events from the same person follow your Conversion API settings.
It can't recall an event already sent. Setting the flag on an event Cometly has already forwarded does not remove it from the ad platform.
Nothing else changes. Attribution models, reports, revenue and journeys include the event as normal.
Your Conversion API settings still apply. Events without the flag are sent according to the data-sharing mode and event rules for each platform. See Configure the Cometly Meta Conversion API.
If you have any questions, please contact Cometly Support by clicking the chat icon in the bottom right of your screen or email support@cometly.com.
