Fix guide · Webflow · medium · about 30 min
ChatGPT Ads click ID (oppref) lost on Webflow
For the finding “Click ID from OpenAI ads is not stored”. Also for: Any website, Shopify, WordPress, Framer.
What this means
When someone clicks an ad in ChatGPT, the link to your site carries an attribution identifier in the oppref URL parameter. The OpenAI Pixel on your Webflow site should pick it up on the landing page, store it in the first-party cookie __oppref, and send it with later events, so a lead or order on another page can still be tied to the ad click. On your site, the click ID was not stored, or not sent with the pixel’s events.
Why it costs you money:
- Conversions lose their link to the ChatGPT ad click, so ChatGPT Ads reports fewer conversions than your ads really brought.
- Conversion-optimized campaigns learn from fewer attributed conversions and may optimize toward the wrong results.
- If you send server events through the OpenAI Conversions API, OpenAI notes that the API does not capture
opprefby itself; your server has to pass it on.
How to confirm it yourself
Our check opens your page in a browser in the EU as if arriving from a ChatGPT ad, with a test click ID in the URL, accepts the cookie banner, and then looks for the click ID. If our report shows a redirect chain, start there: it often shows exactly where the parameter was dropped.
- Open a private (incognito) window, open developer tools (F12) on Network, and tick Preserve log.
- Open the exact URL your ads use, with a made-up click ID added:
https://yourdomain.com/landing?oppref=test123. (This sends a normal page view to your own pixel. It does not create an ad click.) - If the first request is a redirect (
301,302,307,308), check its Location header. Does the new address still containoppref=test123? - Accept the cookie banner, wait a few seconds, then go to Application > Cookies (Chrome) or Storage > Cookies (Firefox).
__opprefshould holdtest123, and__obref(the pixel’s browser reference) should be there too. - Filter the Network tab by
bzr.openai.comand open a request: the payload should carryopprefwith your test value.
How to fix
Work through the chain: the link must arrive with oppref, the pixel must run on that page with consent, and nothing may delete the cookie afterwards.
- Point your ads at the final address. Webflow redirects your other connected domains (for example the version without
www) to the default domain, set in Site settings > Publishing > Production with Make default. In our tests on Webflow-hosted sites, Webflow also redirectedhttptohttpsand removed a trailing slash from page addresses, and these redirects kept the query string. Still use the exact final address in every ad (default domain,https, no trailing slash), so the visitor lands without a redirect. - Do not send ads through Webflow 301 redirects. In our tests, redirect rules from Site settings > Publishing > 301 redirects sent visitors to the new address without the query string, so
opprefwas lost before the pixel could run. This includes the redirect Webflow creates when you change a page’s slug and tick Permanently redirect the old URL to this new one. Check every ad URL against your redirect list and link ads to the new page directly. - Check localized pages. Webflow’s 301 redirects do not apply to localized subdirectories, so
/es/old-urlneeds its own rule, and an ad pointing at an old localized address may end on a 404 page. Webflow’s automatic routing to a visitor’s preferred locale uses a302redirect; in our test it kept the query string, but link ads for a given language to that locale’s URL anyway. - Check redirects outside Webflow, such as a domain registrar’s forwarding, rules in a proxy or CDN in front of the site, link shorteners or campaign link tools. These commonly drop the query string.
- Check scripts that clean the address bar. A script that removes query parameters after the page loads (for example Finsweet’s removequery Attribute, or custom “clean URL” code) can erase
opprefbefore a consent-gated pixel starts, because the pixel reads it from the address of the page it runs on. Remove it from landing pages, or let it keepoppref. - Make sure the pixel runs on the landing page after consent. OpenAI says the pixel uses its cookies only when measurement consent is granted. If it only starts on the next page,
opprefis no longer in the address. When your consent tool holds back the snippet, it must release it right after Accept, on the same page; with GTM, the OpenAI tag must fire on the consent event, not only on the next page view. See “OpenAI Pixel does not fire after consent”. - Do not withdraw consent for visitors who already agreed. OpenAI documents that
oaiq("consent", false)removes both pixel cookies,__opprefincluded. If Head code calls it on every page and your consent tool switches consent back on a moment later, the stored click ID is deleted on every page after the landing page. Read the stored choice first and passtruestraight away for visitors who accepted; with Consent Pro, that value isconsents.marketingin itswindow.FinsweetConsentPro.push(["consent", ...])callback. - Check that your consent tool keeps the cookie. After Accept,
__opprefshould stay, including on the next page. Some tools delete cookies when the visitor changes preferences; Finsweet’s older Cookie Consent documents that it erases cookies and re-runs scripts in that case. - Pass the click ID to your server events. If a webhook or automation sends form leads to the OpenAI Conversions API, the form has to carry the click ID: add a hidden field, fill it after consent from the
__opprefcookie (or from the landing page URL), and have the server send the original string unchanged asoppref. For hybrid setups, OpenAI also asks you to send the__obrefcookie value asuser.obref. - Publish to your custom domain after any change.
Common causes
- Ads link to an old URL that Webflow now 301-redirects (often after a slug change), and the redirect drops the query string.
- A registrar forwarding rule, proxy rule or link shortener in front of the site drops
oppref. - A script removes query parameters from the address before the pixel starts.
- The pixel waits for consent and only starts on the next page.
oaiq("consent", false)runs on every page, so the cookie is removed again and again.- Server events are sent without
oppref.
How to verify the fix
- Repeat the test above using the exact ad URL: no redirect drops
?oppref=test123, and after accepting cookies__opprefholdstest123. - Open another page of the site:
__opprefis still there, and the pixel’s requests still carryoppref. - Re-run the check on IsPixelWorking. The issue should be gone, and the redirect chain in the report (if any) should keep the click ID.
Sources
- OpenAI Developers, Measurement Pixel (captures
oppreffrom the landing page URL, stores it in the first-party__opprefcookie,__obrefbrowser reference, cookies used when consent is granted,oaiq("consent", false)removes both cookies): https://developers.openai.com/ads/measurement-pixel - OpenAI Developers, Conversions API (
opprefis not captured by the API, pass the original string;user.obreffrom the__obrefcookie): https://developers.openai.com/ads/conversions-api - OpenAI Developers, Conversion Tracking (capture
opprefand include it on the server event): https://developers.openai.com/ads/conversion-tracking - Webflow Help, How do I set up redirects in Webflow? (Site settings > Publishing > 301 redirects, slug-change redirects, localized subdirectories): https://help.webflow.com/hc/en-us/articles/33961294898835-How-do-I-set-up-redirects-in-Webflow
- Webflow Help, Set a default domain (Site settings > Publishing > Production, Make default): https://help.webflow.com/hc/en-us/articles/33961339571475-Set-a-default-domain
- Webflow Help, Localized SEO and locale routing (locale routing uses 302 redirects): https://help.webflow.com/hc/en-us/articles/33961235675155-Localized-SEO-and-locale-routing
- Consent Pro Docs, JavaScript API reference (
consents.marketing, callback queue): https://docs.consentpro.com/runtime/api - Finsweet Attributes, removequery (“Remove the URL query parameters from the URL after the page loads”): https://github.com/finsweet/attributes/tree/master/packages/removequery
- Finsweet Cookie Consent README (cookies erased when preferences change): https://cdn.jsdelivr.net/npm/@finsweet/cookie-consent@1/README.md
- IsPixelWorking live test, 2026-10-04 (responses served by Webflow hosting, tested with a
fbclidquery parameter): on Webflow-hosted sites, non-default domain to default domain (301),http://tohttps://(301) and/page/to/page(301) kept the query string; Webflow locale routing (302to/deand/fr) kept it; custom 301 redirect rules on several sites dropped the query string.
More OpenAI guides
- OpenAI Pixel fires before cookie consent on Webflow
- OpenAI Pixel not firing after cookie consent on Webflow
- Repeated OpenAI event IDs drop ChatGPT Ads conversions
- Duplicate OpenAI Pixel events on Webflow
- OpenAI Pixel events have no event ID on Webflow
- OpenAI Pixel tracks a button on desktop but not on mobile
- Two OpenAI Pixel IDs on one site: when it's fine, how to fix
- OpenAI Conversions API deduplication: match the pixel event_id
- OpenAI Ads Pixel setup: install the ChatGPT Measurement Pixel
- How to set up the OpenAI Conversions API for ChatGPT Ads