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 oppref by 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.

  1. Open a private (incognito) window, open developer tools (F12) on Network, and tick Preserve log.
  2. 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.)
  3. If the first request is a redirect (301, 302, 307, 308), check its Location header. Does the new address still contain oppref=test123?
  4. Accept the cookie banner, wait a few seconds, then go to Application > Cookies (Chrome) or Storage > Cookies (Firefox). __oppref should hold test123, and __obref (the pixel’s browser reference) should be there too.
  5. Filter the Network tab by bzr.openai.com and open a request: the payload should carry oppref with 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.

  1. 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 redirected http to https and 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.
  2. 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 oppref was 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.
  3. Check localized pages. Webflow’s 301 redirects do not apply to localized subdirectories, so /es/old-url needs 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 a 302 redirect; in our test it kept the query string, but link ads for a given language to that locale’s URL anyway.
  4. 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.
  5. 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 oppref before 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 keep oppref.
  6. 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, oppref is 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”.
  7. Do not withdraw consent for visitors who already agreed. OpenAI documents that oaiq("consent", false) removes both pixel cookies, __oppref included. 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 pass true straight away for visitors who accepted; with Consent Pro, that value is consents.marketing in its window.FinsweetConsentPro.push(["consent", ...]) callback.
  8. Check that your consent tool keeps the cookie. After Accept, __oppref should 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.
  9. 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 __oppref cookie (or from the landing page URL), and have the server send the original string unchanged as oppref. For hybrid setups, OpenAI also asks you to send the __obref cookie value as user.obref.
  10. 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

  1. Repeat the test above using the exact ad URL: no redirect drops ?oppref=test123, and after accepting cookies __oppref holds test123.
  2. Open another page of the site: __oppref is still there, and the pixel’s requests still carry oppref.
  3. 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

More OpenAI guides