> For the complete documentation index, see [llms.txt](https://docs.adpage.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.adpage.io/integrations-marketingtools/openai-ads/tracking-cookies-and-consent.md).

# Tracking cookies and consent

Learn which cookies and browser storage identifiers the ChatGPT Ads Measurement Pixel uses, including consent requirements.

When integrating or documenting the ChatGPT Ads Measurement Pixel (`oaiq`) on an e-commerce website, cookies are stored in the user's browser across two distinct domain levels: First-party cookies (set directly on your domain) and Third-party / Cross-site cookies (set on OpenAI's domain).

#### 1. First-Party Cookies (Set on Your Domain)

These cookies are set directly on your domain (e.g., `yourdomain.com`) by the ChatGPT Ads Measurement Pixel JS SDK (`bzrcdn.openai.com`). They are used to retain click-attribution parameters as the visitor navigates through your site.

<table data-header-hidden><thead><tr><th width="98.7777099609375"></th><th width="121.6666259765625"></th><th width="124.22216796875"></th><th width="106.5555419921875"></th><th></th></tr></thead><tbody><tr><td><strong>Cookie Name</strong></td><td><strong>Scope / Domain</strong></td><td><strong>Type</strong></td><td><strong>Expiration</strong></td><td><strong>Purpose &#x26; Description</strong></td></tr><tr><td><code>__oppref</code></td><td><code>.yourdomain.com</code></td><td>Marketing / Attribution</td><td>30 to 90 days</td><td>Stores the OpenAI Partner/Placement Reference <strong>click identifier</strong> (<code>oppref</code>) extracted from the landing page URL. Ensures conversion attribution persists if the user buys later in the same or a subsequent session.</td></tr><tr><td><code>__obref</code></td><td><code>.yourdomain.com</code></td><td>Marketing / Analytics</td><td>90 days</td><td>Stores the OpenAI Link/Listing Reference (<code>obref</code>). It tracks <strong>context-specific ad placement details</strong> (e.g., specific ChatGPT prompt sessions or feed placements).</td></tr></tbody></table>

#### 2. Third-Party / Cross-Site Cookies (Set on OpenAI Domains)

These cookies are set under OpenAI's infrastructure domain (e.g., `.openai.com` / `bzr.openai.com`) when the pixel fires cross-site network requests.

<table data-header-hidden><thead><tr><th width="92.111083984375"></th><th width="133.77783203125"></th><th width="119.22216796875"></th><th width="106"></th><th></th></tr></thead><tbody><tr><td><strong>Cookie Name</strong></td><td><strong>Scope / Domain</strong></td><td><strong>Type</strong></td><td><strong>Expiration</strong></td><td><strong>Purpose &#x26; Description</strong></td></tr><tr><td><code>__obi</code></td><td><code>.openai.com</code></td><td>Marketing / Analytics</td><td>1 Year (365 days)</td><td>OpenAI Browser Identifier. Set with <code>SameSite=None; Secure</code>. Binds off-site conversions on your store to the user's logged-in ChatGPT account or device session.</td></tr></tbody></table>

#### 3. Local Storage Identifiers (Browser Storage)

In addition to traditional cookies, the `oaiq` SDK uses the browser's `localStorage` to preserve state in case cookies are cleared or restricted by privacy features (like Apple's ITP):

* `_oaiq_consent`: Stores the user's current consent decision (`true` or `false`) so the pixel knows whether to collect and transmit measurement events.
* `_oaiq_config`: Temporarily caches the advertiser's Pixel ID configuration to reduce network round-trips during page navigation.

#### Compliance Note for Privacy Documentation (GDPR / ePrivacy)

If you are updating your website's Cookie Banner / CMP (Consent Management Platform) or Privacy Policy:

1. Category: Categorize `__oppref`, `__obref`, and `__obi` under Marketing / Targeting (or Advertising) in your Cookie Banner.
2. Consent Blocking: Ensure the script `oaiq("consent", false)` is explicitly set before initializing the pixel, or gate the script execution entirely until the user grants marketing consent. The pixel defaults to tracking (`consent = true`) unless explicitly blocked.

## Consent and ChatGPT Ads conversions

In the EU, ChatGPT Ads measurement only runs for visitors who accept marketing cookies. Visitors who decline can still buy, but the purchase is usually not linked to the ad click. Ads Manager therefore reports fewer conversions than your shop recorded from ChatGPT traffic.

This page explains what happens, how large the effect can realistically be, and what consent does not explain.

### What happens when a visitor declines

* The OpenAI Pixel sends no measurement events while consent is `false`. Blocked events are not replayed when consent is granted later.
* The `__oppref` (click ID) and `__obref` cookies are only used when measurement consent is granted. Setting consent to `false` removes both.
* The Conversions API does not capture `oppref` itself. It only forwards the value the browser stored. If the server tag is mapped to marketing consent (see step 8 of the setup guide), it does not fire without consent either.
* Result: the order exists in your shop, but OpenAI cannot link it to an ad click.

{% hint style="warning" %}
The OpenAI Pixel starts with consent set to `true`. It only waits for consent if you set `oaiq("consent", false)` before `init`, or block the script until the visitor opts in. If your CMP is not connected to the pixel, the pixel runs for everyone. Check this in GTM preview.
{% endhint %}

### How large is the effect?

Only a share of visitors is affected, not all of them. As a rough rule:

> Measurable conversions ≈ real ChatGPT-sourced orders × consent rate

Example (illustrative, not a measurement): 100 real orders from ChatGPT clicks and a 50% marketing consent rate means at most about 50 orders can be linked to a click. Other gaps (see below) reduce that further.

Consent rates differ widely by site, market and banner design. Published EU benchmarks vary from well below 30% to above 70%, so use the rate from the client's own CMP dashboard rather than an industry average.

OpenAI also mentions **modeled measurement**, which can estimate attribution for conversions without a click ID "where available". Availability per account or region is not documented. Do not rely on it to close the gap. OpenAI states that differences between Ads Manager and other tools can result from browser, consent and storage conditions, and that a difference does not necessarily indicate an error.

### What consent does not explain

Consent removes a share of conversions. It does not explain a total of zero after a meaningful number of clicks. If Ads Manager shows clicks and no conversions at all, check the following first.

| Symptom                                                        | Likely cause                                                                                                                                 |
| -------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| No conversions at all, server events reach OpenAI              | The server tag is still in test mode (`validate_only`).                                                                                      |
| `oppref` never appears in any event                            | No `page_view` OpenAI Pixel tag, so the click ID is never stored in `__oppref`.                                                              |
| Browser and server events do not count as one purchase         | Different event name or event ID between the Pixel and the Conversions API.                                                                  |
| `oppref` on `page_view` events, but missing on purchase events | The purchase is sent from a shop webhook. Webhooks carry no browser cookies, so the click ID is missing unless it was stored with the order. |
| Browser purchase arrives, but Ads Manager does not count it    | The Pixel tag inherits the dataLayer name and sends a custom event instead of `order_created`.                                               |
| Ads Manager clicks are much higher than sessions in GA4        | Expected gap: consent, ad blockers, page-load failures and attribution windows differ.                                                       |

Rule these out before attributing a gap to consent.

### How to recognize the consent effect

Compare over the same period and time zone:

1. Sessions in GA4 with `utm_source=chatgpt` and `utm_medium=paid_ai`.
2. Orders in the shop from those sessions.
3. Conversions in OpenAI Ads Manager.

If (3) is clearly lower than (2), the tracking checks above are clean, and the client's consent rate is below 100%, the gap is at least partly consent. Analytics tools also depend on consent, so treat (1) and (2) as a lower bound.

### What you can do

* **Connect the CMP to the OpenAI tags.** Fire them only after marketing consent, either through a consent-based trigger group or by setting `oaiq("consent", ...)`.
* **Fire the OpenAI `page_view` tag after the consent update.** The landing URL still contains `oppref` on the first page. If the tag fires before consent is known, that click ID is lost. See Trigger sequence for consent processing. Test what happens when consent is given after the landing page has loaded.
* **Keep the click ID with the order.** If purchases are sent from a shop webhook, store `oppref` with the order or send the purchase from the browser as well, with a shared event ID.
* **Add static UTM parameters** to every campaign so you can see ChatGPT visits and shop orders per campaign. See UTM parameters & dynamic tracking.
* **Judge campaigns on shop orders per source next to Ads Manager**, not on Ads Manager alone.
* **Review the cookie banner** if the consent rate is low. See Ideal cookiebanner setup.

{% hint style="warning" %}
Never send events, hashed emails or `oppref` for visitors who declined, and never override the consent state to report more conversions. OpenAI requires you to follow your site's consent rules and to stop sending data when consent is revoked.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.adpage.io/integrations-marketingtools/openai-ads/tracking-cookies-and-consent.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
