Fix guide · Webflow · easy · about 20 min

Duplicate OpenAI Pixel events on Webflow

For the finding “Duplicate OpenAI events”. Also for: Any website, Shopify, WordPress, Framer.

What this means

The same event (for example page_viewed or lead_created) was sent twice for the same OpenAI Pixel ID within about a second. Webflow offers several places for code: site-wide custom code, page settings, Code Embeds, Apps and Google Tag Manager (GTM). A duplicate nearly always means the pixel, or one of its event calls, sits in two of them.

OpenAI throws away exact repeats: it keeps the first event with the same Pixel ID, event name and event ID. But when your code passes no event_id, the pixel gives each call its own random ID (OpenAI does not document this, but you can see it in the request payload), so two calls for one action count as two conversions.

Why it costs you money:

  • ChatGPT Ads counts some conversions twice, so reports look better than reality and your cost per conversion looks lower than it is.
  • Conversion-optimized campaigns learn from inflated data and may optimize toward the wrong results.

This is about two identical browser events. A browser event plus a server (Conversions API) event for the same action is expected; OpenAI counts that pair once when both carry the same event ID (see “OpenAI events have no event ID”).

How to confirm it yourself

Our check runs from a browser in the EU and accepts the cookie banner before looking for duplicates.

  1. Open your published site in a private (incognito) window, open developer tools (F12), go to Network and filter by bzr.openai.com.
  2. Accept cookies.
  3. Open the requests’ payload. Each request carries a list of events, and the pixel batches events that happen close together, so one request can hold both copies. The Pixel ID is the pid value in the request address. Two events with the same type for the same pid at almost the same moment are a duplicate. Different pid values mean two pixels, which may be intended (for example an agency pixel and a client pixel).
  4. Submit a test form and check that lead_created (or your form event) appears once.
  5. To see every measure call in the console, add debug: true to the init call while you test on the webflow.io staging domain, and remove it before publishing to your custom domain.

How to fix

  1. Check every place a Webflow site can load the pixel or send its events. Search the published page source for oaiq.min.js and oaiq(, then check:
    • Site settings > Custom code: Head code, Footer code, and code added by installed Apps.
    • Page settings > Custom code of individual pages and CMS template pages. With Webflow Localization, check each locale: page code can differ per locale.
    • Code Embed elements, especially inside components used on every page (a navbar or footer), and code in Rich text or CMS items.
    • Your GTM container: Custom HTML tags containing oaiq, OpenAI’s own GTM template, and Stape’s OpenAI Ads Pixel tag.
    • Your consent tool: the OneTrust app keeps scripts in its own Blocked Scripts section, which adds a separate code snippet to your site. A copy there plus a copy in Head code is a duplicate.
    • Third-party tools that install their own OpenAI browser pixel or send ChatGPT Ads conversions.
  2. Check that GTM is installed only once. GTM can be added as a snippet in Head code or by the Google site tools for Webflow App, which connects a Tag Manager container for you. If both are present, or two containers both contain an OpenAI tag, every event is sent twice.
  3. Keep one installation, remove the rest. OpenAI’s snippet checks whether oaiq already exists, so a second copy usually does not load the SDK twice, but its own init and measure calls still run. Remove the whole second copy, not just one line. Choose:
    • Custom code in Head code if you manage the pixel and your consent tool directly.
    • GTM if you manage all tags there. Remove the snippet from Webflow’s custom code.
    • A tool that sends both browser and server events (so it can share event IDs between them). Remove the manual copies.
  4. Check form events. A Webflow form either shows its Success message on the same page or redirects to a page you choose (form Settings panel). Send lead_created from one place only: from code that runs when the form succeeds, or on the thank-you page, not both. Also check for a GTM tag and a page-level snippet that both send lead_created for the same form, and keep one.
  5. Check event calls on pages with their own code. A page_viewed call in Head code and another in a page’s Inside <head> tag field run on the same page load. Keep it in one place.
  6. Add event IDs. With your own event_id on each action, an accidental second call for the same action carries the same ID, and OpenAI keeps only the first. That is a safety net, not a replacement for removing the extra copy.
  7. Publish the site to your custom domain (and publish GTM if you changed it).

Common causes

  • The snippet is in Head code and also in GTM, or in the OneTrust app’s Blocked Scripts and in Head code.
  • The snippet is in Site settings and again in a page’s custom code, or in a Code Embed inside a component on every page.
  • GTM added by the Google site tools App and also pasted into Head code, or two containers that both include an OpenAI tag.
  • A lead_created event on form success and another on the thank-you page.
  • A template or cloned project came with a pixel already in its custom code or embeds.

How to verify the fix

  1. In a private window on the published site, accept cookies and check that each event appears once per Pixel ID: on page load and after a test form submission.
  2. Re-run the check on IsPixelWorking. The issue should be gone.

Sources

More OpenAI guides