Growth marketer operator · San Jose, CA | ZuAI: 10K → 2M users at $0.02 CAC | $300k/mo ad spend managed
Ar.Bhavesh Pro
ChatGPT Ads

OpenAI pixel (OAIQ) setup for ChatGPT Ads

install the OpenAI pixel, the oaiq snippet, add measure calls for real conversions, keep oppref alive through redirects, and test before you spend.

last updated 5 November 2026

the OpenAI pixel is the JavaScript snippet that tracks conversions for ChatGPT Ads, and oaiq is its function name. you install it inside the <head> of every page, initialised with the Pixel ID from the Conversions section of Ads Manager. it fires a page_viewed event on its own. every real conversion, a purchase, a sign-up, a lead, needs an oaiq("measure", ...) call that you add yourself on the page where that action completes. without those calls you have a working pixel and no conversion data.

Why it goes in before the campaign

the Conversions objective needs a working standard event to exist before you can build the campaign, and delivery is optimised toward the signals you send. a pixel installed the morning of launch is how you get a campaign that spends without learning, because the system is optimising against signals that are not arriving yet. install it, test it, then create campaigns.

Setup, step by step

  1. open the Conversions section of Ads Manager and copy your Pixel ID.
  2. paste the pixel snippet inside the <head> of every page, initialised with that Pixel ID. it fires page_viewed automatically, so you will see activity straight away. that activity is not a conversion.
  3. on each page where a conversion completes, add a measure call with the event and, where one exists, a value:
oaiq("measure", "purchase", { value: 49.00, currency: "USD" });
  1. keep the event list short and tied to money: a sign-up, a trial start, a purchase. only standard events can drive optimisation, custom events cannot, so check which events your account lets you select before you build around one.
  2. send a value wherever one exists. optimising toward “a conversion” treats a ₹50 order and a ₹5,000 order identically, which is only right if your product has one price.
  3. make sure oppref survives every redirect between the ad and the conversion (next section).
  4. fire a real test conversion and confirm it appears in Ads Manager before you spend anything.

Keep oppref alive

when someone clicks your ad, OpenAI appends a click reference called oppref to your landing page URL, something like ?oppref=gAAAAAb123. the pixel reads it and stores it in a first-party cookie, so a conversion that happens three pages later can still be tied back to the click.

the most common way this breaks is a redirect that drops the query string: a link shortener, a locale redirect, an http to https hop. any of them throws oppref away before the pixel ever sees it. click through your own ad path once, hop by hop, and check the parameter is still on the URL when the page with the pixel loads.

The mistake that looks like success

installing the pixel, seeing page_viewed firing, and assuming you are done. page_viewed fires automatically. your conversion events do not exist until you add the measure calls on the pages where the action completes. it is easy to have a green-looking pixel and zero conversion data, and easy not to notice for a week. check the event, not the pixel.

What the pixel does with customer data

the pixel handles automatic advanced matching. it picks up contact details from recognisable forms, normalises them and hashes them with SHA-256 in the browser before anything is sent, so raw customer information never leaves the page.

Where the pixel is not enough

the pixel runs in the browser, so it loses events to ad blockers, browser privacy changes and people who close the tab before it fires. that is what the OpenAI Conversions API is for, and running both together is the setup worth having. for places where you cannot run a script at all, such as some email and checkout flows, there is also an image tag: a no-JavaScript fallback that is useful at the edges and not a replacement for either.

Pixel checklist

  • the pixel is inside the <head> of every page.
  • a measure call sits on every page where a conversion completes.
  • the event you plan to optimise toward is a standard event your account can select.
  • the value you send matches what you actually earn.
  • oppref is still on the URL after every redirect.
  • a real test conversion shows up in Ads Manager.

the full write-up, with the Conversions API, deduplication and the rules of the Conversions objective, is in ChatGPT Ads tracking: OAIQ pixel and OpenAI Conversions API.

next in this playbook: the OpenAI Conversions API, for the events the browser loses.

the pixel is one leg of the ChatGPT Ads playbook. if you want your tracking checked before you spend, the breakdown call is free. Let’s talk Growth.

this page is part of the ChatGPT Ads playbook.

next

More in this playbook

Want this run on your app?

the playbook is free and yours. if you would rather it was executed than read, tell me what you are working on.

answers go to a private google sheet and to my inbox, used only to reply and follow up. the newsletter is opt in and separate.

Want this run on your app?

the breakdown call is free. bring one real growth problem, leave with the fix.

Let's talk Growth