> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cometly.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Track only after consent

> Set up Cometly cookie consent: have your consent banner block the Cometly pixel so no visitor data is collected until the visitor opts in.

The Cometly pixel is the script on your site that records visits, so each lead and sale can be tied back to the ad that produced it. If you are required to obtain consent before running analytics or marketing cookies (for example under GDPR, ePrivacy or CPRA), you can integrate Cometly with your consent banner so that **no** data is tracked until the visitor opts in.

Setting up Cometly cookie consent this way lets you keep attributing the visitors who accept, while visitors who decline are never tracked. Your consent banner (also called a Consent Management Platform, or CMP) makes the decision: Cometly only runs when the banner lets its script load.

> [!NOTE]
>
> **Disclaimer**: This page is provided for informational purposes only and does **not** constitute legal advice. For questions about compliance with privacy or data protection laws, seek professional legal counsel.

> [!WARNING]
>
> **Important**: Per our [Terms of Service](https://www.cometly.com/terms) and [End User License Agreement (EULA)](https://www.cometly.com/eula), you (the customer) are responsible for ensuring compliance with all applicable data protection laws and implementing appropriate consent mechanisms.

## 1. Cometly domain and cookies

The Cometly pixel is a single script tag. The domain it loads from is the one in the `src` of your snippet, which you find under **Setup** > **Install the Cometly pixel** > **Install the pixel**:

* **`js.comet-serve.com`**: the default for current snippets.
* **Your own subdomain** (for example `data.yourdomain.com`): if you turned on [First Party Domain Tracking](https://docs.cometly.com/guides/tracking/first-party-domain.md).
* **`t.cometlytrack.com`**: older snippets that have not been replaced since they were installed.

Check the snippet that is on your site and use that domain in the steps below.

When the pixel runs, you might see:

* **`cometly_tracker_session`**: unique session token
* **`XSRF-TOKEN`**: security token
* **Other random identifiers**: used for analytics or marketing metrics

Because these are generally considered **non-essential** cookies, they should not load until the visitor consents.

## 2. Block the Cometly script until consent

1. **Identify the domain**: Configure your Consent Management Platform (CMP) or cookie banner to block your Cometly script domain (see above) by default.
2. **Use a "Marketing" or "Analytics" category**: In your CMP settings, classify Cometly under a category that is disabled unless the visitor opts in.
3. **Allow on opt-in**: If the visitor accepts cookies, your CMP unblocks the domain and the Cometly script loads.
4. **Test**: Before consent, confirm no Cometly cookies load. After consent, verify the cookies appear.

For the exact settings, check your CMP or consent banner provider's documentation on script and domain blocking.

## 3. No consent = no tracking

Because the Cometly pixel relies entirely on being loaded by your cookie banner:

* **No pixel = no data collection.** If the banner keeps blocking the script, Cometly never tracks anything.
* **Consent given = tracking starts.** Once the visitor opts in, Cometly cookies are set and attribution data begins.

## 4. Your responsibility under our Terms of Service

* **Legal compliance**: Our [Terms of Service](https://www.cometly.com/terms) outline that you bear full responsibility for adhering to privacy regulations in your jurisdiction.
* **No sensitive data**: Cometly prohibits sending confidential or protected information (health data, credit card data).
* **Policy references**: Mention Cometly in your cookie or privacy policy and explain how visitors can opt out or manage consent.

### More information about our policies

* [Terms of Service](https://www.cometly.com/terms)
* [Privacy Policy](https://www.cometly.com/privacy)
* [Cookie Policy](https://www.cometly.com/cookie-policy)
* [Acceptable Use Policy](https://www.cometly.com/acceptable-use)
* [Data Processing Addendum (DPA)](https://www.cometly.com/dpa)
* [End User License Agreement (EULA)](https://www.cometly.com/eula)
* [Third Party Sub Processors](https://www.cometly.com/sub-processors)

By using Cometly, you agree to our Terms of Service.

## Check it worked

Open your site in a private browser window and, before you answer the banner, look at the cookies in your browser's developer tools: no Cometly cookies should be there. Accept the banner and check again: `cometly_tracker_session` now appears. You can also open the [Cometly Pixel Helper](https://docs.cometly.com/guides/tracking/pixel-helper.md) after accepting, which shows an **Init** event on each page where the pixel loaded.

## Frequently asked questions

### Do we have to mention Cometly's cookies by name?

Yes. For transparency, list any cookies or tokens (`cometly_tracker_session`, `XSRF-TOKEN`) your site may set, including their domain and purpose. Your browser's developer tools show the exact names and domains set on your site after consent.

### Can we treat some Cometly tokens as strictly necessary?

Typically, they are considered non-essential. If unsure, consult your legal counsel.

### Does declining the banner prevent all Cometly tracking?

Yes, if correctly configured: the banner blocks your Cometly script domain until the visitor accepts.

## Next steps

* [Install and verify the Cometly pixel](https://docs.cometly.com/getting-started/install-pixel.md): find your snippet and confirm the pixel loads.
* [Check the pixel with the Cometly Pixel Helper](https://docs.cometly.com/guides/tracking/pixel-helper.md): see whether the pixel fires on a page.
* [Exclude an event from the Conversion API](https://docs.cometly.com/guides/conversion-api/exclude-an-event.md): keep a conversion from being sent to ad platforms when a person opts out of sharing.
* [Contact support](https://docs.cometly.com/support/contact.md) with technical questions. We will do our best to help, but depending on your consent provider and tech stack we may not be able to.

Still have questions or need a hand? We're happy to help. Reach our team at [support@cometly.com](mailto:support@cometly.com).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.