What is oaiq? The OpenAI pixel behind ChatGPT Ads, explained
If you've spotted oaiq in a network log or a site's source, you're looking at OpenAI's Measurement Pixel: the tag businesses install to measure results from ChatGPT Ads. This page explains what it sends and what it doesn't, then gives advertisers the snippet, every command, the event list, the CSP rules and a three-step check.
The short answer
oaiq is the JavaScript function behind OpenAI's Measurement Pixel, the conversion-tracking tag for ChatGPT Ads. A website that advertises on ChatGPT loads it from bzrcdn.openai.com/sdk/oaiq.min.js and calls oaiq("init") with its Pixel ID and oaiq("measure") when you buy, sign up or submit a form. It sends those events to bzr.openai.com so the advertiser can see which ChatGPT ad clicks led to a result. It is not malware, and it doesn't read your ChatGPT conversations.
Saw oaiq in your browser? Here's what it is
Most people meet oaiq in a network log, an ad-blocker report or a page's source code. If you're one of them, the facts are short:
- Who runs it: the website you're on, not ChatGPT. The site owner added OpenAI's tag because they run ChatGPT Ads.
- What it sends: named events (such as
page_viewedororder_created), optional order values, the page origin, and a click reference calledopprefif you arrived from a ChatGPT ad. If the site turns on advertiser-supplied or automatic matching, it can also send SHA-256 hashes of details like your email. - What it doesn't send: your ChatGPT prompts or chats. OpenAI gives advertisers aggregated results only.
- The domains:
bzrcdn.openai.comserves the script and per-pixel settings;bzr.openai.comreceives the events. Both belong to OpenAI. - The cookies:
__oppref(the ad-click reference, 30 days) and__obref(a random browser reference, 365 days), both first-party on the advertiser's domain.
If you'd rather not be measured, decline marketing or measurement cookies in the site's consent banner. A site that wires consent correctly calls oaiq("consent", false), which stops events and deletes both cookies. Content blockers that block bzr.openai.com also stop it.
The oaiq snippet, line by line
For advertisers: this is OpenAI's install snippet. It goes near the top of the <head> on every page where you want to measure conversions, so early events aren't lost while the page loads.
<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>
if (w.oaiq) return;stops the loader running twice if two tags include it.- The
qqueue stores everyoaiq(...)call made before the SDK finishes downloading, then replays them. That's why you can callmeasurestraight afterinit. js.async = truekeeps the script from blocking page rendering.oaiq("init", ...)needs the Pixel ID you create in Ads Manager under Conversions → Data Sources. Adddebug: truewhile testing to log activity to the console.
Every oaiq command
| Command | What it does |
|---|---|
oaiq("init", { pixelId, debug, user }) | Starts the pixel for one Pixel ID. The optional user object carries hashed identifiers for matching; it applies to the whole session, so don't add it to individual events. |
oaiq("measure", event, data, { event_id }) | Sends an event to every pixel initialized so far. event_id is what deduplicates it against the same event sent from your server. |
oaiq("measureSingle", pixelId, event, data, options) | Sends an event to one Pixel ID only, for pages that report to more than one pixel. |
oaiq("consent", true | false) | Turns measurement on or off. Call it with false before init if you need opt-in consent, then true once the visitor agrees. Events blocked while consent was off are not replayed. |
The events oaiq can send
Each event pairs a name with a data shape. Use the standard names wherever one fits, because only standard events can be a conversion campaign's optimization goal.
| Event | Data shape (type) | Typical trigger |
|---|---|---|
page_viewed | contents | Any page load |
contents_viewed | contents | Product or article detail page |
items_added | contents | Add to cart |
checkout_started | contents | Checkout begins |
order_created | contents | Order confirmed |
lead_created | customer_action | Lead form submitted successfully |
registration_completed | customer_action | Account created |
appointment_scheduled | customer_action | Booking confirmed |
subscription_created | plan_enrollment | Paid plan started |
trial_started | plan_enrollment | Free trial started |
custom | custom | Anything else; reportable, but can't be an optimization goal |
Two more standard events, app_installed and app_opened, come from apps through the Conversions API or a mobile measurement partner rather than from oaiq.
oaiq("measure", "order_created", {
type: "contents",
amount: 12999, // $129.99 in minor units
currency: "USD",
contents: [{ id: "sku_123", name: "Trail shoe", content_type: "product", quantity: 1 }]
}, { event_id: "order_12345" });
oaiq("measure", "trial_started", { type: "plan_enrollment", plan_id: "pro_trial" });
Amounts are integers in the currency's minor unit, so $129.99 is 12999. Sending 129.99 is the most common bug, and it fails quietly by putting your revenue off by 100×.
oaiq vs the Conversions API
oaiq runs in the visitor's browser and captures oppref for you. The Conversions API runs on your server, survives ad blockers and consent-blocked browsers, and can send events that happen later, such as a lead qualifying in your CRM. OpenAI recommends both, with the same event_id on each copy of an event so it counts once. Never call the Conversions API from page code: the key would be exposed in the browser. The comparison in our conversion tracking guide covers when each one matters.
Content Security Policy for oaiq
If your site sends a CSP header, add these sources (from OpenAI's pixel docs) or the pixel will be blocked silently:
| Directive | Source | Why |
|---|---|---|
script-src | https://bzrcdn.openai.com | Loads the SDK |
connect-src | https://bzr.openai.com | Sends events |
connect-src | https://bzrcdn.openai.com | Fetches per-pixel settings |
img-src | https://bzr.openai.com | Image-request fallback |
Use a nonce or hash for the inline snippet rather than adding 'unsafe-inline'.
How to check that oaiq is working
- Initialize with
debug: trueand watch the browser console as you complete the action. - Open the Network tab and confirm a request to
bzr.openai.comfor that event. - In Ads Manager, go to Conversions → Data Sources, open your Web Pixel's three-dot menu, choose Test, and check the labeled events in Event Stream.
A loaded script isn't the same as a sent event, and a received event isn't the same as an attributed conversion. Our guide on testing ChatGPT Ads conversion tracking covers each step, and the 7-step setup covers everything around the pixel.
What Is oaiq: frequently asked questions
What is oaiq?
oaiq is the JavaScript function name of OpenAI's Measurement Pixel, the conversion-tracking tag advertisers install on their websites to measure results from ChatGPT Ads. It loads from bzrcdn.openai.com and sends events to bzr.openai.com.
Is oaiq malware or a tracker I should worry about?
It's a legitimate OpenAI advertising measurement script that the website's owner chose to install. It's a tracker in the ordinary marketing sense: it records actions like purchases so the advertiser can measure ChatGPT ad results. It doesn't read ChatGPT conversations. Declining measurement cookies in the site's consent banner, or a content blocker, stops it.
What does oaiq stand for?
OpenAI doesn't say. The name follows the pattern of other ad-pixel command queues, and in practice it simply identifies the OpenAI Ads measurement SDK.
Is oaiq the same as the ChatGPT pixel or the OpenAI pixel?
Yes. “oaiq”, “OpenAI Pixel”, “OpenAI Measurement Pixel”, “ChatGPT pixel” and “ChatGPT Ads pixel” all refer to the same tag.
Does oaiq set cookies?
Yes, two first-party cookies once measurement consent is granted: __oppref, which stores the ChatGPT ad-click reference for 30 days, and __obref, a random browser reference kept for 365 days. Calling oaiq("consent", false) deletes both.
Can I use oaiq with Google Tag Manager?
Yes. OpenAI doesn't publish its own template, so either put the snippet in a Custom HTML tag or use a community template such as Stape's. Our ChatGPT Ads GTM setup guide walks through both.
Sources and further reading
- OpenAI Developers — Measurement Pixel (snippet, consent, CSP, cookies, event examples)
- OpenAI Developers — Conversions API
- OpenAI Help Center — Troubleshooting conversion tracking for ChatGPT Ads
See which ChatGPT answers mention you, free
Your pixel tells you what a paid click was worth. A free AI-visibility scan shows the prompts where ChatGPT already recommends your brand, the ones where it names competitors instead, and the sources it cites. The first scan is free and needs no card. Want the pixel installed for you? See our conversion tracking implementation.
Run my free scan