EN DE
Get a Free Audit

What Is oppref? The ChatGPT Ads Click ID, Explained

oppref is the ChatGPT Ads click identifier, like gclid or fbclid. Learn how the pixel captures it, how the __oppref cookie works, and how to pass it server-side.

What Is oppref? The ChatGPT Ads Click Identifier, Explained

When someone clicks your ChatGPT Ad, OpenAI adds a small code to your landing page URL. That code is called oppref. It is the one piece of information that lets OpenAI connect a click to a sale or a lead. If you lose it, your conversions get tracked as “from nowhere” and your ChatGPT Ads reporting goes blind.

This page explains what oppref is in plain terms, how it gets captured, why the Conversions API ignores it unless you tell it not to, and the three mistakes that quietly break tracking. It is a short reference, written to be read before you build your full conversion setup.

Key Takeaways

  • oppref is the ChatGPT Ads click ID. It is OpenAI's version of Google's gclid or Meta's fbclid: a tag added to your landing page URL that says "this visit came from this ad click."
  • The browser pixel grabs it for you. When the OpenAI pixel loads, it reads oppref from the URL and saves it in a first-party cookie called __oppref (a roughly 30-day lifetime per practitioner sources).
  • The Conversions API does NOT. Server-side events do not auto-capture oppref. You have to read it yourself and attach it to each event, or your offline and CRM conversions will not match back to the ad.
  • Most tracking failures are oppref failures. Redirects that strip the URL, a cookie that never gets set, and missing the value on server events are the three usual culprits.

This explainer feeds into the full setup work we do under tracking and measurement. For the wider attribution picture, see our ChatGPT Ads attribution guide.


oppref in One Sentence

oppref is a privacy-preserving click identifier that OpenAI passes on your landing page URL so it can tell which ad click led to which conversion.

Think of it like a numbered cloakroom ticket. When you hand over your coat, you get a ticket. Later you give the ticket back, and the attendant returns the exact coat. The ticket itself tells the attendant nothing about you. It is just a reference number. oppref works the same way: it is a reference that lets OpenAI match “the click” to “the conversion” without revealing who the user is.

If you have run Google Ads, you already know this idea under a different name. Google adds gclid (Google Click ID) to a link so it knows which click led to a sale. Meta adds fbclid. OpenAI’s version is oppref. Same job, different platform.

PlatformClick identifierWhat it does
Google AdsgclidTies a click to a conversion in Google Ads
Meta AdsfbclidTies a click to a conversion in Meta
ChatGPT AdsopprefTies a click to a conversion in OpenAI Ads

So when you read “oppref”, just translate it in your head to “the ChatGPT Ads version of gclid”. That is all it is.


How the Pixel Captures oppref

The good news: if you install the OpenAI measurement pixel, you mostly do not have to think about oppref. The pixel handles it.

Here is what happens, step by step:

  1. A user clicks your ChatGPT Ad. OpenAI sends them to your landing page and adds oppref to the URL, so the address looks something like yoursite.com/offer?oppref=AbC123....
  2. Your page loads the OpenAI pixel. The pixel is a small JavaScript file (oaiq.min.js) loaded from OpenAI’s servers, fired through the oaiq() function, the same way Google’s tag fires through gtag().
  3. The pixel reads oppref from the URL. It does this automatically. You do not write any code for this part.
  4. The pixel stores the value in a first-party cookie named __oppref. “First-party” means the cookie belongs to your own domain, not a third party, so it survives modern browser privacy rules better. Practitioner sources report a roughly 30-day lifetime for this cookie.
  5. On every later page view, the pixel reuses the cookie. Even if the user clicks around your site and the oppref disappears from the URL, the pixel still knows the original click because the value is sitting in the __oppref cookie.

That last point is why the cookie matters. A click and the conversion that follows it rarely happen on the same page. Someone lands on your offer page (oppref is in the URL), then navigates to a form three pages later (oppref is long gone from the URL). The __oppref cookie is what carries the value across those page views.

You do not need to add oppref to your own links. Unlike a UTM tag that you build into a URL, oppref is added by OpenAI on the click. Your job is to not lose it: install the pixel, and avoid the redirect and cookie mistakes covered below.

Why the Conversions API Does NOT Auto-Capture oppref

This is the single most important thing on this page, and it is the part that catches almost everyone.

The browser pixel and the Conversions API are two different ways to send conversions to OpenAI:

  • The browser pixel runs in the visitor’s browser. It can see the URL and the cookies, so it captures oppref for free.
  • The Conversions API (CAPI) runs on your server, or in server-side Google Tag Manager. It sends events straight from your backend to OpenAI. CAPI is what you use for conversions that do not happen in the browser: a CRM marking a lead as qualified, a phone sale, a refund, a subscription renewal.

Here is the catch. A server does not automatically know about a browser cookie. So the Conversions API does not auto-capture oppref. If you send a server-side conversion without manually attaching oppref, OpenAI receives an event it cannot connect to any ad click. The conversion happened, but it is orphaned. It will not show up against your campaign.

The orphaned-conversion trap: Many teams install the pixel, see conversions appear, then add server-side CAPI for offline events and assume oppref carries over. It does not. Every CAPI event needs the oppref value attached by you. Skip this and your offline conversions silently fail to attribute, which makes ChatGPT Ads look worse than it is.

The fix is a relay race. The browser captures oppref, hands it off to your server, and your server attaches it to the CAPI event. We will look at how to set up that handoff next.


If you use Google Tag Manager, capturing and persisting oppref is a clean three-step pattern. The principle is the same whether you write the code by hand or use a prebuilt tag.

  1. Read oppref from the URL. In GTM, create a URL variable (query parameter) that reads oppref from the page address. This catches the value on the landing page.
  2. Write it to a first-party cookie. Set a first-party cookie (you can keep the __oppref name, or use your own) so the value survives across page views and back into your CRM journey. This mirrors exactly what the pixel does, but now your own tracking owns a copy.
  3. Attach it to the server event. When you fire a server-side conversion through the Conversions API, read the cookie and include oppref in the event payload. Now the offline or delayed conversion carries its click ID.

You do not have to build this from scratch. The open-source TAGGRS server-side GTM Conversions API tag captures the oppref query parameter, stores it in a first-party cookie, sends standard and custom events, and hashes email and phone for better matching. It is published under Apache 2.0, so it is free to inspect and use. Reading how it handles oppref is a good shortcut to understanding the pattern.

The full server-side build (endpoint, authentication, event mapping, deduplication) sits in our server-side tracking guide and is part of what we set up under tracking and measurement.

ChatGPT Ads is live only in the US, UK, Australia, New Zealand, and Canada, and is not bookable for EU or DACH advertisers as of 13 June 2026. You can still build and test the oppref capture now. EU teams should also gate the pixel behind consent, since the browser tag should only set the __oppref cookie after the user agrees.

oppref and Deduplication

Once you run both the pixel and CAPI, a new question appears: will the same conversion get counted twice, once by the browser and once by your server?

OpenAI handles this with deduplication. The pixel and the Conversions API deduplicate by event ID. You give each conversion a unique id (the pixel calls it event_id, the API calls it id) and reuse the same value on both channels for the same conversion. If OpenAI receives two events with the same id, it discards the duplicate, and server-side data is typically prioritized.

So oppref and the event id do two different jobs, and you need both:

FieldJobAnalogy
opprefSays which ad click this conversion belongs toThe cloakroom ticket
event idSays which single conversion this is, so it is counted onceThe receipt number

Get oppref right and OpenAI knows the conversion came from your ad. Get the event id right and OpenAI counts it exactly once even when both the pixel and CAPI report it. Lead-gen events you will commonly send include lead_created, registration_completed, appointment_scheduled, and for ecommerce order_created.


Common Mistakes That Break oppref Tracking

Almost every “ChatGPT Ads is not tracking conversions” problem traces back to one of these three.

  1. A redirect strips the URL. If your ChatGPT Ad points at a link that bounces through a redirect (a shortener, an old vanity URL, an affiliate hop), the redirect can drop the query string and oppref vanishes before your pixel ever sees it. Point ads at the final landing page, or make sure every redirect in the chain preserves the full query string.
  2. The cookie never gets set. If the pixel does not fire on the landing page (consent blocked it, a tag-manager trigger is wrong, the script failed to load), there is no __oppref cookie. Then the conversion on a later page has nothing to attach to. Confirm the pixel fires on the entry page, not only on a thank-you page.
  3. CAPI events go out without oppref. Covered above, and worth repeating because it is the most common server-side error. The Conversions API does not auto-capture oppref. If your server events do not carry it, your offline and CRM conversions will not attribute.
A 60-second check: Click your own live ChatGPT Ad, land on the page, then open your browser developer tools and look at the cookies for your domain. If you see a __oppref cookie with a value, the browser side is working. If it is missing, fix that before you touch the Conversions API. There is no point sending server events that have no click ID to carry.

For the bigger picture of how ChatGPT Ads conversions move across channels, and why last-click reporting undercounts this channel, read our ChatGPT Ads attribution guide.


Frequently Asked Questions

Is oppref the same as gclid?

It does the same job. gclid is Google's click identifier, fbclid is Meta's, and oppref is the ChatGPT Ads one. All three are a code added to your landing page URL that tells the platform which ad click led to a conversion. The format and the platform differ, but the purpose is identical: connect a click to a sale or a lead.

How long does the __oppref cookie last?

Practitioner sources report a roughly 30-day lifetime for the first-party __oppref cookie set by the pixel. OpenAI's own docs are the source of truth for the current behaviour, so check them when you build. A 30-day window means a click and a conversion that happen up to about a month apart can still be matched, which matters for considered purchases and longer lead cycles.

Do I still need oppref if I already use UTM parameters?

Yes. They are not the same tool. UTM parameters (like utm_source=chatgpt) help your analytics, such as GA4, label the traffic as coming from ChatGPT. oppref is what OpenAI's own reporting and Conversions API use to attribute the conversion back to a specific ad click. Use UTMs for your GA4 channel reporting and oppref for OpenAI-side conversion attribution. They work together, not instead of each other.

Does the Conversions API capture oppref automatically?

No. The browser pixel auto-captures oppref from the URL into the __oppref cookie. The Conversions API, which runs on your server, does not. You must read oppref (usually from the cookie the pixel set) and attach it to each server-side event yourself, or those conversions will not match to an ad click.

Where do I find oppref to debug it?

Two places. First, on a fresh ad click, look in the landing page URL for an oppref= parameter. Second, after the pixel has fired, open your browser's developer tools, go to the cookies for your domain, and look for __oppref. If both are present, capture is working. If the URL has it but the cookie does not, your pixel is not firing on that page.


Get oppref Right Before You Scale Spend

oppref is a small thing that decides whether your whole ChatGPT Ads measurement works. The browser pixel captures it for free, the Conversions API needs you to pass it by hand, and three avoidable mistakes (redirects, missing cookies, and bare server events) account for most failures. Set it up once, test it with a real click, and your conversion data will hold together as you grow.

If you would rather have this built and verified for you, that is exactly what we do under tracking and measurement and as part of our ChatGPT Ads service. A free audit is the fastest way to find out whether your current setup is capturing oppref correctly or quietly losing conversions.

18 points
Free Download

ChatGPT Ads Measurement Readiness Checklist

A pre-launch readiness check for measuring ChatGPT Ads server-side. 18 points covering pixel and Conversions API setup, consent-gated loading, deduplication, and event mapping.

Need help with your performance marketing?

Book a free consultation and let's discuss your goals.