Back to Blog
Paid AI Search 8 min read

The OpenAI Ads Pixel (oaiq): Setup, Events, and Troubleshooting

The pixel that measures ChatGPT Ads loads from oaiq.min.js. Here is how it installs, which events matter for lead gen versus commerce, and the failures we hit running our own campaign.

Paul Byrne July 2026 8 min read
The short version: OpenAI's Ads measurement pixel loads from bzrcdn.openai.com/sdk/oaiq.min.js. You initialise it once with your pixel ID, then call oaiq("measure", ...) whenever someone does something worth counting. Lead-gen sites care about lead_created, registration_completed and appointment_scheduled. Commerce sites care about order_created and the events around the basket. Most of the pain is not the install. It is the payload shape, the attribution, and a serving throttle while your business verification is still pending.

This is a practitioner reference for the OpenAI Ads pixel, the small script known as oaiq. It sits alongside our companion piece on ChatGPT Ads conversion tracking, which covers the wrong-URL trap and the Content Security Policy that silently blocks the script. This one goes deeper on the setup itself, the full event model, and the specific things that broke when we ran a campaign on ourselves.

We got into the ChatGPT Ads beta, wired up the pixel, and kept notes on every failure. Where a claim below comes from our own account, it is labelled as such. Everything else is drawn from OpenAI's developer documentation, linked inline.

What oaiq.min.js actually is

OpenAI launched a JavaScript pixel and a server-side Conversions API in May 2026, giving advertisers two ways to report what happens after a ChatGPT ad click (Lapis). The pixel is the browser side of that pair. It loads from https://bzrcdn.openai.com/sdk/oaiq.min.js, and it works the way the Meta pixel or Google's gtag works: a base snippet in your page, then named events fired when a visitor does something you want to measure (OpenAI Developers).

The file gets its name from the global function it creates, oaiq, a command queue that holds your calls until the real SDK downloads and takes over. If you have ever installed fbq or gtag, the shape will look familiar.

One quick note before the setup: several third-party guides point the loader at the wrong host, which means the script never downloads and your dashboard reads zero. We cover that trap and the Content Security Policy fix in the companion post, so we will not repeat it here.

The official setup, in four moves

Per OpenAI's own documentation, installation comes down to four steps (OpenAI Developers):

  1. Place the loader high in the <head> of every page you want to measure, near the top so early conversions are not lost while the rest of the page loads.
  2. Initialise once with your pixel ID. The init call takes an object, not a bare string.
  3. Optionally pass a hashed user object to init to improve conversion matching. This data is request-scoped, so it belongs on init and not on individual measure calls.
  4. Fire events with oaiq("measure", eventName, eventData, options) at the moment the action happens.

A minimal install for a lead-gen site looks like this:

<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",
    // optional, improves matching; hash before sending
    user: { email_sha256: "<sha256-of-lowercased-email>", country: "GB" },
    // optional, logs SDK activity to the console while testing
    debug: true
  });

  // fire this when the form is actually submitted, not on page load
  oaiq("measure", "lead_created", { type: "customer_action" });
</script>

Turn debug on while you test. It prints what the SDK accepts and rejects to the browser console, which is the fastest way to catch a malformed event. And copy the verbatim snippet from Ads Manager, under Tools then Conversions, or from OpenAI's docs. Do not trust a blog over OpenAI's own code, including this one.

The event model: which event, when

OpenAI publishes ten standard event names (OpenAI Developers):

You will not use all ten. The useful split is by business model.

Lead generation

If you sell a service or book calls, the events that matter are lead_created for a completed enquiry form, registration_completed for an account sign-up, and appointment_scheduled for a booked call. A subscription product adds subscription_created and trial_started. Fire the one that maps to real intent and optimise toward that, rather than counting every soft touch.

Commerce

A shop cares about the path to purchase: contents_viewed and items_added for browsing signals, checkout_started for intent, and order_created for the sale itself. The purchase event is the one to optimise toward once you have enough volume.

Data shapes and amounts

Every event carries a type field that names its data shape. The documented shapes are contents, customer_action, plan_enrollment and custom, and each standard event maps to one of them: the browsing and order events use contents, the enquiry and sign-up events use customer_action, and the subscription events use plan_enrollment (event taxonomy reference). Where an event carries money, the amount goes in as an integer in the currency's minor units, so 2599 means 25.99 in that currency, sent with a currency field.

One detail worth knowing if you plan to add the server-side Conversions API later: you can pass the same event_id on both the pixel event and the server event so OpenAI can deduplicate the two reports of the same conversion (event taxonomy reference). Worth setting up early, because retrofitting IDs later is fiddly.

Troubleshooting, from our own campaign

Here is where the reference meets reality. These are things we saw in our own account, not general advice.

The base page event was rejected

In our own campaign, the base page event failed validation. On every page load the browser console logged [oaiq] validation failed; event dropped, while lead_created and order_created fired without complaint. OpenAI's docs list page_viewed as a valid event, so the event name was fine. A dropped page_viewed therefore points at the shape of the payload we sent. The fix path is the same every time. Turn on debug, read the exact validation message in the console, check the type and data shape against the docs, and paste the verbatim snippet from Ads Manager. A pixel that reports your money events is worth more than a tidy page-view count, so we did not let a dropped page event hold up the launch.

Zero events reaching the dashboard, with the event linked

For a stretch, the conversion pixel received no events at all, and Ads Manager showed a warning that no recent conversion events had arrived in the last 24 hours. What made this one slow to diagnose was that the conversion event was correctly linked to the campaign, so the usual first suspect was already ruled out. The lesson we took: a linked event and a firing event are two different things. Confirm the event actually posts in the browser Network tab before you trust the linkage in the dashboard.

Attribution: why the clicks looked like Direct

This one cost us clean reporting rather than money. In our own campaign, every paid click landed in GA4 bucketed as Direct. The ad platform appends its own click parameters to the landing URL, but GA4 did not read them as a source or medium, so a run of real ad clicks looked like unattributed direct traffic.

The fix is UTM discipline. Tag every ad destination URL with explicit parameters, for example:

https://www.searchintel.tech/check/?utm_source=chatgpt.com&utm_medium=cpc&utm_campaign=si_test&utm_content=ad_a1

Once the UTMs were on each ad, GA4 attributed the sessions correctly and we could read cost per lead per ad rather than staring at a single Direct blob. Do this before you spend, not after, or the early days of data are effectively unattributed.

Current limits, honestly held

ChatGPT Ads is a young product and it is moving fast, so treat everything in this section as a snapshot rather than a fixed rule.

The safest habit with a product this new is to copy the verbatim snippet each time you touch the setup, verify in the browser before you trust the dashboard, and re-check anything you read against Ads Manager, because the details change faster than the guides do.

Frequently asked questions

What is oaiq.min.js?

oaiq.min.js is OpenAI's Ads measurement pixel, a first-party browser script that records what people do on your site after they click a ChatGPT ad. It loads from https://bzrcdn.openai.com/sdk/oaiq.min.js. The global command queue it creates is named oaiq, which is where the file gets its name.

Which OpenAI Ads events should I use for lead generation?

For a lead-gen site the events that matter are lead_created for a form completion, registration_completed for an account sign-up, appointment_scheduled for a booked call, and subscription_created or trial_started if you sell a subscription. Commerce sites lean on order_created and the events around the basket instead.

How does OpenAI Ads expect monetary values in the pixel?

Amounts are sent as an integer in the currency's minor units, so 2599 means 25.99 in that currency, alongside a currency field. Always copy the exact shape from Ads Manager or OpenAI's developer docs rather than a blog, because the payload shape is what the SDK validates against.

Why do my OpenAI ad clicks show as Direct in GA4?

In our own campaign every paid click arrived in GA4 bucketed as Direct. The ad platform's own click parameters were not read by GA4 as a source or medium, so the traffic looked unattributed until we added explicit UTM tags to each ad URL. Tag every ad destination with utm_source, utm_medium and utm_campaign.

Is the OpenAI Ads pixel available outside the US?

The pixel itself runs on any site, but at launch our campaign could only target the United States. Targeting, serving rules and the wider ChatGPT Ads product are changing quickly, so treat any limit you read as a snapshot and check the current state in Ads Manager.

If you are setting up ChatGPT Ads measurement, start with the conversion tracking companion piece for the loader URL and the Content Security Policy fix, then use this page as your event reference. And if you are not yet sure whether AI even recommends your brand organically, you can check your AI visibility for free across ChatGPT, Claude, Gemini, Perplexity and Google AI.

Before You Pay to Advertise, Know if AI Even Recommends You

We run both sides of the answer economy: organic AI visibility and paid ChatGPT Ads. Get a free AI visibility score across ChatGPT, Claude, Gemini, Perplexity and Google AI, and see who AI recommends instead.

Related Articles