What Is the ChatGPT Measurement Pixel in 2026?
The Measurement Pixel is OpenAI's browser SDK for measuring website events that can be attributed to ads in ChatGPT. You add a script to your site, initialise it with a Pixel ID, and call oaiq("measure", ...) when a conversion happens. Alongside it, the Conversions API sends the same kinds of events from your server. Both identify the same data source through a Pixel ID.
If you are evaluating ChatGPT Ads as a channel, this is the part to build first. Without it you can report clicks and spend but not outcomes, and you cannot use conversion-optimised bidding at all. The Ads API guide covers campaign mechanics; this one covers the measurement layer underneath.
How Do the Three Building Blocks Fit Together in 2026?
Three distinct objects, and conflating them is the most common setup error. A data source receives events from your website or server. A conversion event setting defines which event from that source counts as a conversion. A campaign then uses the attached event setting for reporting and, when configured, for optimisation. Sending an event and creating a setting are separate steps: a setting selects an event from a source, it does not send events itself.
| Object | What it does | Created by |
|---|---|---|
| Data source (pixel) | Receives events from browser or server | POST /v1/conversions/pixels |
| Conversion event setting | Defines which event counts as a conversion, with an attribution window | POST /v1/conversions/event_settings |
| Campaign attachment | Connects the setting to a campaign for reporting or optimisation | conversion_event_setting_ids on the campaign |
One detail catches nearly everyone: a data source returns two identifiers with different jobs. The pixel_id initialises the Pixel, sends server events and checks recent events. The id selects the source when creating a conversion event setting. OpenAI's documentation is explicit that you use the source's id in source_ids, not its pixel_id.
Why Would You Use the Conversions API as Well as the Pixel?
Because a server records things a browser cannot see, and because OpenAI states directly that the Conversions API is a more reliable tracking source than the pixel alone. The browser pixel measures what happens on the page. The server integration reports confirmed outcomes such as a completed order that survived payment capture. Running both, with shared event IDs so duplicates are recognised, is the configuration that reports the truth.
| Integration | Where events are sent | When to use it |
|---|---|---|
| Measurement Pixel | The customer's browser | Measure actions that happen on your website |
| Conversions API | Your server | Send actions recorded by your server, such as confirmed orders |
| Both | Browser and server | Measure the same actions through both, with shared event IDs to prevent duplicates |
A server-only integration still needs a Pixel ID, but does not require installing the browser pixel. That is useful for teams whose consent posture or site architecture makes a client-side tag awkward.
How Do You Install the Measurement Pixel in 2026?
One script in the <head> of every page where you want to capture conversions. OpenAI advises putting it near the top of the head so early conversions are not lost while other content loads. pixelId is required; debug is optional and logs SDK activity to the browser console while you test.
<script>
(function (w, d, s, u) {
if (w.oaiq) return;
var q = function () { q.q.push(arguments); };
q.q = [];
w.oaiq = q;
var js = d.createElement(s);
js.async = true;
js.src = u;
var f = d.getElementsByTagName(s)[0];
f.parentNode.insertBefore(js, f);
})(window, document, "script", "https://bzrcdn.openai.com/sdk/oaiq.min.js");
oaiq("init", { pixelId: "<YOUR-PIXEL-ID>" });
</script>
Then fire an event when the action completes
oaiq(
"measure",
"order_created",
{ type: "contents", amount: 8900, currency: "USD" },
{ event_id: "order_12345" }
);
Amounts use the currency's standard minor unit, so 8900 is 89.00 USD. Use the real order ID as the event ID, and keep it identical if you also send the same purchase from your server.
What Does the Content Security Policy Need to Allow?
Four entries, and this is the step that silently breaks installs on sites with a strict CSP. If your site enforces one, merge these sources into the existing policy rather than discovering later that events never left the browser.
| Directive | Source | Purpose |
|---|---|---|
script-src | https://bzrcdn.openai.com | Load the Measurement Pixel SDK |
connect-src | https://bzr.openai.com | Send events with fetch or sendBeacon |
connect-src | https://bzrcdn.openai.com | Fetch per-pixel configuration |
img-src | https://bzr.openai.com | Send events with the image request fallback |
How Do You Handle Consent in 2026?
Set consent before initialising the pixel. OpenAI documents that the pixel initialises consent to true by default unless you set it to false or the pixel finds a stored denial. When consent is false the pixel does not send measurement-event pings, and setting it back to true allows future events but does not replay blocked ones.
oaiq("consent", false);
oaiq("init", { pixelId: "<YOUR-PIXEL-ID>" });
// Call this after the user grants measurement consent.
oaiq("consent", true);
Two consequences worth stating to a client. Blocked events are gone, not queued, so a slow consent banner costs you measurable conversions. And calling oaiq("consent", false) removes the pixel's cookies. For any team operating under the DPDP Act in India or GDPR in Europe, the default-true behaviour is the setting your privacy review will ask about, so configure it deliberately rather than inheriting it.
What Cookies Does the Pixel Set, and for How Long?
Two first-party cookies when measurement consent is granted, with different lifetimes and different refresh behaviour. OpenAI notes these are the lifetimes requested by the pixel, and that browser restrictions or cleared cookies can shorten them.
| Cookie | Expiry | What it stores and how it refreshes |
|---|---|---|
__oppref | 30 days after the pixel writes it | The oppref attribution identifier from the landing page URL. Each time the pixel captures a non-empty oppref parameter, including the same value again, the expiry resets to 30 days. Reading the stored cookie on a visit without the parameter does not extend it. |
__obref | 365 days after creation | A randomly generated browser reference for your website. A valid stored reference is reused without extending expiry. |
OpenAI is careful to separate these from attribution: cookie expiry is browser storage only and is distinct from conversion attribution windows and conversion-data retention.
How Do You Send Server-Side Conversions in 2026?
Create a Conversions API key with your Advertiser API key, then post events to a different host. Setup and management requests go to api.ads.openai.com with the Advertiser key; event requests go to bzr.openai.com with the Conversions key. Keep both on your server.
curl -X POST "https://api.ads.openai.com/v1/conversions/api_keys" -H "Authorization: Bearer ${OPENAI_ADS_API_KEY}" -H "Content-Type: application/json" -d '{ "name": "Acme server events" }'
curl -X POST "https://bzr.openai.com/v1/events?pid=${PIXEL_ID}" -H "Authorization: Bearer ${OPENAI_CONVERSIONS_API_KEY}" -H "Content-Type: application/json" -d '{
"events": [
{
"id": "order_12345",
"type": "order_created",
"timestamp_ms": 1784304000000,
"action_source": "web",
"source_url": "https://shop.example.com/checkout/confirmation",
"data": { "type": "contents", "amount": 8900, "currency": "USD" }
}
]
}'
Two testing affordances are genuinely useful. Adding "validate_only": true at the top level validates a request without saving events, and those requests do not appear in event monitoring. And the recent-events endpoint returns a sample from roughly the last 15 minutes, which is how you confirm an integration before you trust a report.
The identifier the Conversions API will not capture for you
When an ad click supplies an oppref identifier, you must capture it and include the original value as oppref on the server event. OpenAI states the Conversions API does not capture this value automatically. Practically, that means your landing page needs to read the parameter and persist it into your order record, which is a development task somebody has to own before launch rather than after.
How Does Deduplication Work Between Browser and Server?
Through three shared values. For the same purchase sent through both integrations, use the same Pixel ID, the same event name such as order_created, and the same event ID, which is event_id on the pixel and id on the Conversions API. For custom events, also use the same custom_event_name. Those shared values let OpenAI recognise the duplicate so the action is not counted twice.
Use your real order or lead identifier as the event ID everywhere. Teams that generate a fresh random ID per integration get double-counted conversions, and double-counted conversions feed conversion-optimised bidding, so the error does not stay a reporting problem for long.
Which Conversion Events Can You Send in 2026?
Thirteen event names, each with a defined data type. Standard events cover most commerce and lead flows, and custom exists for anything the taxonomy does not describe. Monetary values are integers in the ISO 4217 minor unit for the currency you send, so 129.99 USD is 12999.
| Event name | Data type | Use for |
|---|---|---|
order_created | contents | A purchase is completed |
checkout_started | contents | A user starts checkout |
items_added | contents | Items added to a cart, bundle or selection |
contents_viewed | contents | A product, listing or article is viewed |
page_viewed | contents | An important page loads |
lead_created | customer_action | A lead form is submitted or contact requested |
registration_completed | customer_action | Account or event registration finishes |
appointment_scheduled | customer_action | A meeting, demo or consultation is booked |
subscription_created | plan_enrollment | A paid subscription starts |
trial_started | plan_enrollment | A free trial starts |
app_installed | customer_action | An app install. Conversions API only, with action_source: mobile_app |
app_opened | customer_action | An app open. Conversions API only |
custom | custom | Anything outside the standard taxonomy |
Two boundaries to respect. app_installed and app_opened are not supported by the JavaScript pixel and must go through the Conversions API. And OpenAI distinguishes page_viewed for page loads from contents_viewed for viewing a specific product or content item, including interactions after the page has loaded.
How Do You Create a Conversion Event Setting?
Name it, pick the event type, set an attribution window in days, and point it at one source. OpenAI's example uses a 30-day click attribution window, described as the time after an eligible ad click during which a conversion can be credited to it.
curl -X POST "https://api.ads.openai.com/v1/conversions/event_settings" -H "Authorization: Bearer ${OPENAI_ADS_API_KEY}" -H "Content-Type: application/json" -d '{
"name": "Acme purchases",
"event_type": "order_created",
"attribution_window_days": 30,
"source_ids": ["cds_123"]
}'
For a custom event, send event_type: "custom" plus a custom_event_name that matches exactly what your integration sends. Keep that name consistent across the event and the setting or the setting will never match anything.
How Do Conversions Attach to Campaigns, and What Is a View-Through?
Attach settings through conversion_event_setting_ids on the campaign. Clicks and impressions campaigns can track conversions without changing their objective, which means you can measure outcomes on a traffic campaign without committing to conversion bidding. Updating the field replaces the list, so include every setting you want to keep.
On attribution, the documentation draws a line worth quoting to anyone reading a dashboard. The same events support click-through attribution and, where available for your account, view-through attribution. View-through conversions use a fixed one-day window after an eligible ad impression, require no integration changes, and are reported as a separate campaign-level metric in Ads Manager. They are not included in Conversions, which remains the click-through total. CPA, post-click conversion rate, bidding, billing and conversion optimisation all remain click-through-based. Where a conversion is eligible for both, the click takes precedence.
How Do You Verify the Integration Before Trusting a Report?
Check recent events on the source, then confirm the channel each event arrived through. The monitoring endpoint returns a sample of events from roughly the last 15 minutes, which is a testing and troubleshooting tool rather than a reporting one.
curl -G "https://api.ads.openai.com/v1/conversions/events" -H "Authorization: Bearer ${OPENAI_ADS_API_KEY}" --data-urlencode "pid=${PIXEL_ID}" --data-urlencode "limit=50"
Browser events show as pixel_sdk and server events as server_to_server, so you can prove both legs of a dual integration are live. For attributed conversion reporting and history, use Insights instead, and remember from the Ads API guide that conversions update through daily processing, so allow at least a day before drawing conclusions.
What Is Automatic Advanced Matching?
A pixel feature that improves measurement when a click identifier is unavailable. When enabled, the pixel automatically detects supported customer information on your website, then normalises and hashes it in the browser using SHA-256 before including it with conversion events. OpenAI states that raw customer information is not sent through automatic advanced matching, and that you do not need to pass customer information manually or change your implementation.
For agencies, the useful framing for a client conversation is that hashing happens client-side before transmission. That is still a processing activity you should be able to describe in a privacy notice, so document it rather than leaving it implicit.
What Are the Common Mistakes in 2026?
- Using
pixel_idwhere the API wantsid. Event settings take the source'sidinsource_ids. - Forgetting the CSP entries. A strict policy blocks the SDK or the event send with no visible error on the page.
- Not capturing
opprefon the landing page. The Conversions API will not capture it for you, so server-side attribution degrades. - Different event IDs per integration. That produces double-counted conversions, which then feed optimisation.
- Sending amounts in major units. Values are integers in the currency's minor unit, so 89.00 USD is 8900.
- Trying to send app events from the pixel.
app_installedandapp_openedare Conversions API only. - Reading view-through numbers as part of Conversions. They are a separate campaign-level metric and do not affect bidding or billing.
- Leaving consent at the default without a decision. It initialises to true unless you set it otherwise, which is a choice your privacy review should make deliberately.
Key Takeaways for 2026
Measurement on ChatGPT Ads is conventional in shape and unforgiving in detail, and almost every problem traces back to one of three identifiers being wrong.
- Three objects: a data source, a conversion event setting, and the campaign attachment. They are created separately.
- A source returns both
pixel_idandid, and they are not interchangeable. - OpenAI states the Conversions API is more reliable than the pixel alone; running both with shared event IDs is the recommended configuration.
- Install the SDK high in the head, and add the four CSP entries if you enforce a policy.
- Consent defaults to true unless you set it false, and blocked events are not replayed.
- Cookies are
__opprefat 30 days, refreshed on each captured parameter, and__obrefat 365 days. - Thirteen event names exist; app install and open are Conversions API only; amounts are integers in minor units.
- View-through uses a fixed one-day window, is reported separately, and does not feed bidding, billing or CPA.
- Verify with the recent-events endpoint before trusting any report, and allow a day for conversions to settle.
Distk builds and verifies tracking before any budget goes live, because a channel measured badly looks the same as a channel that does not work. If you are standing up ChatGPT Ads measurement in 2026, the dual pixel and server integration with shared event IDs is the configuration we would set up, and the oppref capture is the piece we would make sure your developers own from day one.
Sources
- OpenAI, Conversion Tracking.
- OpenAI, Measurement Pixel, including install, consent, CSP, advanced matching and cookie expiry.
- OpenAI, Conversions API.
- OpenAI, Supported Events.
- OpenAI, Conversion Setup API reference.
Every snippet, field name, cookie lifetime and event name in this guide is quoted from OpenAI's published Ads documentation as of 30 September 2026.