How to Set Up Conversion Tracking on OpenAI Ads Manager (ChatGPT Ads)
If you're testing ChatGPT Ads, the first thing to get right is tracking, because a Conversions objective is only as good as the conversion data feeding it. The setup is the same shape you already know from Meta or Google Ads: a browser pixel, a server-side Conversions API, and a shared event ID so the two don't double-count. What changes is the specific function names and where you get the IDs.
The pieces you need
- A data source in Ads Manager, which holds your Pixel ID and (optionally) a Conversions API key.
- The OpenAI Pixel on your site, firing conversion events from the browser.
- The Conversions API, sending your high-value events server-side where nothing can block the request.
- Conversion events defined in Ads Manager, so OpenAI knows which events count as conversions for your campaigns.
You don't strictly need both the pixel and the API, but OpenAI's own guidance is to run them together. The pixel handles attribution capture and lightweight events; the API guarantees your important events actually arrive.
Step 1: Create a data source and get your Pixel ID
In Ads Manager, go to Tools → Conversions → Create → Data Source. From the Conversions tab you can then provision a Pixel ID and, if you want server-side tracking, a Conversions API key. You'll need the Pixel ID for both the pixel and the API, so grab it first.
Step 2: Install the pixel
Add this snippet to the <head> of every page you want to measure, as near the top as you can so early conversions aren't lost while the rest of 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>
The pixel automatically captures OpenAI's click reference (oppref, appended to your landing page URL as ?oppref=...) into a first-party cookie, and does automatic advanced matching on form data it recognizes. It does not auto-fire your conversion events. You send those yourself.
If your site runs a Content Security Policy, you'll need to allow https://bzrcdn.openai.com for script-src, and https://bzr.openai.com plus https://bzrcdn.openai.com for connect-src. Don't add 'unsafe-inline' just for this; use your existing nonce or hash mechanism.
Step 3: Fire your conversion events
Call oaiq("measure", ...) when a conversion happens. Use a standard event name where one fits:
// A lead form submission
oaiq("measure", "lead_created", { type: "customer_action" });
// A purchase — amount is in the currency's minor unit, so 2599 = $25.99
oaiq("measure", "order_created", {
type: "contents",
amount: 2599,
currency: "USD",
});
Standard events include page_viewed, contents_viewed, items_added, checkout_started, order_created, lead_created, registration_completed, appointment_scheduled, subscription_created, and trial_started. The type inside the data object picks the data shape: customer_action for leads and registrations, contents for anything commerce, plan_enrollment for subscriptions and trials.
If nothing standard fits, use a custom event:
oaiq("measure", "custom", { type: "custom" }, { custom_event_name: "quote_requested" });
When you also send the same conversion server-side (next step), pass a shared ID so OpenAI can deduplicate:
oaiq("measure", "order_created",
{ type: "contents", amount: 2599, currency: "USD" },
{ event_id: "order_12345" }
);
The GTM way (no hand-written code)
Steps 2 and 3 are the code path. If your site runs on Google Tag Manager, there's a tag template that does the same thing without you touching the snippet.
- Add the template. In GTM, go to Templates, and next to Tag Templates click Search Gallery. Search for the OpenAI Ads pixel template, open it, and click Add to workspace, then review the permissions and confirm. (There are a few, including OpenAI's own and community ones from Stape and TensorOps; any of them installs the same measurement pixel.)
- Create a tag from it and fill in the Pixel ID. Add a new tag, pick the OpenAI Ads template, and paste your Pixel ID from the Ads Manager Conversions tab.
- Choose the event. Select the event type (
order_created,lead_created, and so on), and fill in the fields that apply, amount, currency, contents. The event tag initializes the pixel automatically, so you don't need a separate base tag on All Pages. - Attach a trigger. Fire it on whatever marks the conversion, a thank-you page view, a form-submission event, a
purchasepush to the data layer. - Test in GTM Preview, confirm the tag fires and sends the event, then publish.
The server-side Conversions API still runs from your backend or a server-side GTM container, GTM's web container only handles the browser pixel.
Step 4: Add the Conversions API for the events that matter
The pixel can be blocked, delayed, or lose the click reference through a redirect. The Conversions API can't, because it fires from your server where you already have the order record. Send your high-value events (purchases, qualified leads) through both.
It's a single server-side POST:
curl -X POST "https://bzr.openai.com/v1/events?pid=<PIXEL-ID>" \
-H "Authorization: Bearer <API-KEY>" \
-H "Content-Type: application/json" \
--data '{
"events": [{
"id": "order_12345",
"type": "order_created",
"timestamp_ms": 1773892800000,
"oppref": "gAAAAAb123",
"source_url": "https://shop.example.com/checkout/confirmation",
"action_source": "web",
"data": { "type": "contents", "amount": 2599, "currency": "USD" }
}]
}'
Two things to get right:
- The
idmust match the pixel'sevent_idfor the same conversion, or you'll count it twice. - Unlike the pixel, the API does not capture
oppreffor you. You have to read it off the landing page URL yourself, store it (in your session or a cookie), and pass it with the server event. Without it, click matching is weaker.
The timestamp_ms has to be within the last 7 days and no more than 10 minutes in the future. Set "validate_only": true to test a payload without recording it. To improve matching, you can add a user object with SHA-256-hashed email, phone, or name, normalized per OpenAI's rules before hashing (lowercase and trim the email, strip formatting from the phone, and so on).
Step 5: Define conversion events in Ads Manager, then verify
Back in Ads Manager, go to Tools → Conversions → + Create → Conversion Event, pick the type (Lead, Purchase, and so on), and select your pixel. This is what tells OpenAI which of the events you're sending should count as campaign conversions and feed bidding.
To check the pixel is working, use the built-in Pixel Checker (OpenAI's equivalent of the Meta Pixel Helper). It confirms the pixel loaded, initialized, connected to the right Pixel ID, and is sending events.
A few things worth knowing before you trust the numbers
- Preserve
opprefthrough redirects. If someone lands on a URL that redirects (a link shortener, a locale redirect, an old-to-new-path rule), and the redirect drops the query string, you lose the click reference and attribution degrades. Make sure any redirect on your landing paths carries the query string through. - View-through conversions are reported separately. ChatGPT Ads reports view-through on a fixed one-day window as its own campaign-level metric. It's not in the main Conversions number, and it doesn't affect CPA, bidding, or optimization, those stay click-through-based.
- Your numbers won't match GA4, and that's expected. Different attribution windows, time zones, consent and storage conditions, and deduplication behavior all produce different totals. A gap isn't automatically a bug.
- Amounts are in minor units.
2599is $25.99, not $2,599. Sending the wrong scale here is a common and expensive mistake, it distorts ROAS reporting and, if you're on a value-based bid strategy, the bidding itself. - Handle consent if you need to. Call
oaiq("consent", false)beforeinit, thenoaiq("consent", true)after the user agrees. Blocked events aren't replayed once consent is granted.
Frequently asked questions
Do I need both the pixel and the Conversions API? No, but OpenAI recommends running them together. The pixel handles attribution capture and lighter events from the browser; the API guarantees your important events (purchases, qualified leads) arrive even when the pixel is blocked. Use a shared event ID so they deduplicate instead of double-counting.
Where do I get the Pixel ID and API key? Both come from the Conversions tab in OpenAI Ads Manager, after you create a data source under Tools → Conversions.
Does the pixel track page views automatically?
It captures the oppref click reference and does automatic advanced matching on recognizable form data without any extra setup. It does not auto-fire conversion events, you send those with oaiq("measure", ...).
Why is ChatGPT Ads reporting fewer conversions than my site actually got?
Usually a mix of attribution window differences, consent or ad-blocker loss on the pixel, oppref being dropped through a redirect, or events falling outside the window. Adding the Conversions API for high-value events and preserving oppref through redirects closes most of the gap.
Can I fire these events through Google Tag Manager? Yes, and it's the cleanest path if you're already on GTM. Add the OpenAI Ads pixel template from the GTM gallery (covered in the GTM section above) rather than using a custom HTML tag, then create one tag per event with your Pixel ID and a trigger. The server-side Conversions API call still goes through your backend or a server-side GTM container.
OpenAI's own references are Conversion Measurement, the Measurement Pixel docs, and the Conversions API docs.
Getting a new ad platform's tracking set up so the numbers are actually trustworthy, and reconcile against GA4 and your other channels, is what conversion tracking covers. If you're adding ChatGPT Ads alongside Google and Meta, it's worth doing this properly from day one rather than discovering three months in that the data was never right.
Questions about how this affects your account?
Let's talk