OpenAI Conversions API Explained: Server-Side Tracking for ChatGPT Ads (Shopify Guide)
What OpenAI's Conversions API is, how it works, and what it asks of you: events, hashed customer data, oppref and obref, event IDs and deduplication, timestamp and batch rules, testing, errors and Event Quality. Then three honest ways to get it running on a Shopify store.
The short version
- The OpenAI Conversions API (CAPI) sends conversion events, like a purchase, from your server to OpenAI, instead of from the shopper's browser. It still needs a Pixel ID, plus its own Conversions API key.
- OpenAI counts a conversion as a duplicate when the Pixel ID, event name and event ID all match, and keeps the first one it receives. Different event IDs mean two purchases.
- The API does not capture the ad click reference (
oppref) for you. Your setup has to save it from the landing page URL and send it with the server event. - Events must be timestamped within the last 7 days and no more than 10 minutes ahead. Batches hold up to 1,000 events, and one bad event fails the whole batch.
- On Shopify you can build it yourself, use OpenAI's own ChatGPT Ads app (US stores today), or use a tracking app. Whatever you pick, keep one sender per Pixel ID.
Most tracking questions I get come back to the same thing: what the Conversions API actually does, and whether a Shopify store needs it. OpenAI's developer docs answer it, but they are written for engineers. Here it is in plain words, with every rule taken from OpenAI's own documentation, linked at the end.
What is the OpenAI Conversions API?
OpenAI describes the Conversions API as a way to send conversion events "directly from your server to OpenAI", for example when your backend confirms a purchase. It sits next to the Measurement Pixel, the browser script that sends events from the visitor's browser.
OpenAI gives three reasons to use it: measuring conversions without depending only on the browser, better matching through hashed customer identifiers, and control over delivery and retries. Its troubleshooting guide names consent choices, browser blocking and a site's security policy as things that can stop a Pixel request.
Both report to the same data source, identified by a Pixel ID. A server-only setup still needs a Pixel ID, but not the browser Pixel.
How does the OpenAI Conversions API work?
You need two things from the same ad account: a Pixel ID and a Conversions API key. OpenAI says you can create both in the conversions tab of Ads Manager. The Conversions API key is not the same as the Advertiser API key used to manage campaigns and read reports, and OpenAI is clear that both stay on your server, never in browser code.
Events go to https://bzr.openai.com/v1/events with your Pixel ID in the pid parameter and the Conversions API key as a bearer token. A purchase looks roughly like this (shortened):
POST https://bzr.openai.com/v1/events?pid=YOUR_PIXEL_ID
Authorization: Bearer YOUR_CONVERSIONS_API_KEY
{
"events": [{
"id": "order_12345",
"type": "order_created",
"timestamp_ms": 1773892800000,
"action_source": "web",
"source_url": "https://shop.example.com/checkout/confirmation",
"oppref": "the value saved from the ad click URL",
"user": { "emails_sha256": ["64-character hash"] },
"data": { "type": "contents", "amount": 8900, "currency": "USD" }
}]
}
Two details trip people up: amounts are integers in the currency's minor unit (8900 is $89.00) and always need a currency, and web events need a source_url.
Which events can you send?
OpenAI has a fixed list of standard event names. For a Shopify store, five of them map to the shopping journey:
| OpenAI event | What it means on a store |
|---|---|
page_viewed | A page load |
contents_viewed | A product view |
items_added | Add to cart |
checkout_started | Checkout started |
order_created | A completed purchase |
The others are lead_created, registration_completed, appointment_scheduled, subscription_created, trial_started and custom, plus two app events (app_installed, app_opened) that only the Conversions API accepts. Sending an event is not enough on its own: you also create a conversion event in Ads Manager and attach it to your campaigns. A conversion-optimized campaign needs exactly one standard event as its goal, and custom events cannot be optimization goals.
What customer data can you send, and how is it hashed?
Each event can carry an optional user object to help OpenAI match the conversion to an ad. Every field is optional; send what you have and are allowed to share.
- Hashed with SHA-256: email, phone number, first name, last name and your own stable customer ID. You normalize first, then hash, and never send the raw values. Emails are trimmed and lowercased. Phone numbers keep the country code and become digits only, so +1 (415) 555-2671 becomes 14155552671. Names are lowercased with spaces and punctuation removed, keeping accents (José stays josé).
- Sent as plain text: city, region, postal code and two-letter country code, plus the shopper's IP address and user agent. OpenAI's event quality guidance asks for the real shopper's IP and user agent, not your server's.
- Limits: each list holds at most three values. More than that returns HTTP 400; the API does not trim the list for you.
For how matching data affects your reports, see identifier coverage in OpenAI Ads, explained.
What are oppref and obref, and why do click references matter?
When someone clicks a ChatGPT ad, OpenAI adds an oppref parameter to the end of your landing page URL. It is OpenAI's click reference, and OpenAI calls it opaque: you pass the original string on without changing it. It is what lets OpenAI tie a purchase to the specific ad click that led to it.
The browser Pixel captures oppref automatically and keeps it in a first-party cookie for 30 days. The Conversions API does not. A server-side setup has to save the value from the landing URL, keep it through redirects and page changes, and attach it to the server event. If that step is missing, the purchase still arrives, but without the click reference; hashed customer data is what helps OpenAI match it then. Ads Manager's event quality checks flag exactly this as ad click information that is missing or cannot be connected.
obref is different. It is a random browser reference the Pixel stores in its __obref cookie. If that cookie exists, a server integration can read it and send it unchanged inside user, subject to the shopper's consent.
OpenAI also recommends sending all conversion events, not only those with an oppref, so view-through conversions can be included in your campaign's performance metrics.
How does OpenAI deduplicate pixel and Conversions API events?
OpenAI uses three values: the Pixel ID, the event name and the event ID (event_id in the Pixel, id in the API). For custom events, the custom event name takes the place of the event name. OpenAI keeps the first event it receives with a matching key and ignores later copies.
In practice: if the Pixel and the API both send a purchase, they need the same event ID, usually built from the order ID. A retry keeps the original ID, because a new ID looks like a new purchase. And two tools that each invent their own ID for the same order are both counted.
What are the timestamp and batch rules?
| Rule | What OpenAI requires |
|---|---|
| Timestamp | The real time of the action, in Unix milliseconds, within the last 7 days and no more than 10 minutes in the future |
| Retries | Keep the original timestamp and event ID. OpenAI says not to change an old event's time to make it pass |
| Speed | Event quality checks look for server events received within 1 hour of the action |
| Batch size | Up to 1,000 events per request |
| Batch failure | If one event in the batch is invalid, the whole batch fails |
The 7-day limit is about submission, not your attribution window. Send events when the order is confirmed, not in a nightly upload.
How do you test the OpenAI Conversions API?
Add "validate_only": true at the top level of the request. OpenAI checks the events without saving them, so a test does not create a fake purchase, and validation-only events do not appear in event monitoring.
To confirm real events arrive, OpenAI's recent-events check, where available for your account, returns a sample from roughly the last 15 minutes, with server events labeled server_to_server. Keep in mind that an accepted event is not an attributed conversion, and attributed conversions can take about 24 to 48 hours to appear.
What do 401, 403 and 422 errors mean?
OpenAI's Conversions API page does not publish a code-by-code error table. Its troubleshooting guide groups failures by type; the codes below follow how OpenAI uses them elsewhere in its Ads API docs.
| Response | What it points to | What to check |
|---|---|---|
| 401 | Authentication failure: the key is missing or invalid | That you are using the Conversions API key, not the Advertiser API key, in the bearer header, and that it belongs to the same ad account as the Pixel ID |
| 403 | Access denied | The account, the key's access, and whether the feature is enabled for the account |
| 400 or 422 | Validation error: the request breaks a rule | Required fields, allowed values, amounts and currency, the timestamp window, more than three values in a user list. Remember one bad event fails the batch |
| Timeout or server error | You may not know whether it arrived | Retry with the same event ID and original timestamp |
OpenAI also says a rejection is not something to wait out: the 24 to 48 hour reporting delay does not apply to request errors. For the store-side checks, see ChatGPT Ads not tracking? A troubleshooting checklist.
Pixel or Conversions API: do you need both?
OpenAI's measurement guidance suggests using the Pixel and the Conversions API together for more resilient measurement, with the same event ID for the same conversion. It also supports a server-only setup. The honest trade-off:
- Pixel only: easy, captures
opprefon its own, and can use automatic advanced matching, but every event depends on the shopper's browser sending it. - Server only: your server delivers each event to OpenAI and controls retries, but your sender must capture
opprefand matching data itself. - Both: OpenAI says the two channels can provide complementary information, but only if both sides share Pixel ID, event name and event ID. Otherwise you double count.
Whichever you choose, check Event Quality in Ads Manager. It scores each data source, refreshes daily over 7 complete days, and lists warnings such as missing click information, delayed server events or limited customer identifiers. OpenAI is careful to say a score does not predict campaign performance, and asks advertisers never to send invented events or identifiers to raise it.
Does a Shopify store need OpenAI server-side tracking?
If you spend money on ChatGPT Ads and want to judge them on purchases, I think yes. Purchases are the event you can least afford to lose, and conversion-optimized campaigns optimize toward the conversion event you choose. OpenAI built the Conversions API so that measurement does not depend solely on browser event delivery, and that is exactly the risk you want off your purchase data.
Tracking will not make ads profitable, though. ChatGPT Ads is early, and only a small share of stores are profitable on it so far. Good tracking tells you honestly which group you are in.
Three ways to get the Conversions API on Shopify
| Build it yourself | OpenAI's ChatGPT Ads app | A tracking app (e.g. Reach) | |
|---|---|---|---|
| What it is | Your own server code sending events to the Conversions API | OpenAI's free Shopify app: connects your ad account, syncs your catalog into a product feed, sets up "OpenAI Pixel for Shopify" for commerce events, and creates campaigns in Shopify | An app that captures store events and sends them to the Conversions API for you |
| Availability | Any store | US Shopify stores today; OpenAI says more markets "shortly" | Depends on the app |
| Trade-off | Full control, but you own oppref capture, hashing, stable IDs, retries and upkeep | Official and free, with results in Shopify Analytics; OpenAI's help article does not say which events go through the browser and which through a server | No code, but you depend on the app, and you should check what it can and cannot capture |
Reach, the app I build, is server-side only. A Shopify web pixel (an app embed, no theme code) captures five events (page views, product views, add to cart, checkout started and purchases), and Reach's server forwards them to OpenAI's Conversions API with a stable event ID per event, so a retry never counts twice. It captures oppref from the ad click URL, reads OpenAI's __obref cookie when OpenAI's Pixel has set one, and sends hashed email, phone, name, location and customer ID where present. It does not load OpenAI's browser Pixel. Free covers up to 50,000 events a month; Pro is $29 a month and adds revenue and orders from ChatGPT Ads. One honest limit: purchases through third-party checkouts, COD forms or one-click checkout apps skip Shopify's checkout event, so Reach's pixel does not see them and Reach does not send them to OpenAI today; support for them is being built. Reach is independent and not affiliated with OpenAI.
The rule that matters most: one sender per Pixel ID. If two tools send purchases to the same Pixel ID, each with its own event IDs, OpenAI sees two purchases for every order. That is the case today if you run Reach and OpenAI's app on the same Pixel ID. Pick one. A side-by-side comparison is in Reach vs. OpenAI's ChatGPT Ads app, and the full setup is in how to track OpenAI Ads conversions on Shopify.
Sources, checked December 4, 2026: OpenAI's developer docs on the Conversions API, Conversion Tracking, the Measurement Pixel, Supported Events and Troubleshooting, and OpenAI's help articles on conversion measurement, troubleshooting conversion tracking, event quality and ChatGPT Ads for Shopify.
Get server-side ChatGPT Ads tracking without writing code. Install Reach on the Shopify App Store: it sends your store's events to OpenAI's Conversions API with stable event IDs, oppref and hashed customer data, free up to 50,000 events a month.