Fix guide · Any website · easy · about 20 min
Duplicate OpenAI Pixel events: how to find and remove them
For the finding “Duplicate OpenAI events”. Also for: Shopify, WordPress, Webflow, 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. In almost every case, the pixel or one of its event calls is simply installed twice.
OpenAI does throw 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, so two calls for one action look like two different 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, noisy data and may optimize toward the wrong results.
- Decisions based on these numbers (raising a budget, judging an ad) rest on wrong data.
This is about two identical browser events. A browser event and a server (Conversions API) event for the same action are 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.
- Open a private (incognito) window, open developer tools (F12), go to the Network tab and filter by
bzr.openai.com. - Load the page and accept cookies.
- Click the requests and look at the payload: each request carries a list of
events, and the pixel batches events that happen close together, so one request can contain both copies. The Pixel ID is thepidvalue in the request address. Two events with the sametypefor the samepidfired at almost the same moment are a duplicate. - Two different
pidvalues are not duplicates: that is two pixels, which may be intended (for example an agency pixel and a client pixel). - In the Console tab, the pixel’s
debug: trueoption (on a test copy of your site) logs eachmeasurecall, which makes double calls easy to spot.
How to fix
- List every place the pixel or its events can come from. Search the page source (right-click, View page source) for
oaiq.min.jsandoaiq(. Then check:- the site header or theme code, or a “custom code” setting;
- your Google Tag Manager (GTM) container: Custom HTML tags containing
oaiq, OpenAI’s own GTM template, and community templates such as Stape’s OpenAI Ads Pixel tag; - plugins and apps that install the OpenAI pixel or send ChatGPT Ads conversions;
- your own code that calls
oaiq("measure", ...), for example in a form handler or on a “thank you” page.
- Choose one installation to keep. If a tool sends both browser and server events (so it can share event IDs between them), keep that one and remove the manual snippet. If you manage everything in GTM, keep GTM and remove the others.
- Remove the other copies, including their event calls. OpenAI’s snippet checks whether
oaiqalready exists, so a second copy usually does not load the SDK twice, but its owninitandmeasurecalls still run. Remove the whole second copy, not just the<script>line. - Check event calls as well as the base code. Two tags may send the same event: for example a
lead_createdtag on a form trigger and anotherlead_createdcall on the “thank you” page. Keep one. - Check page views on single-page sites. If your site changes pages without a full reload, make sure only one piece of code sends
page_viewedfor each page change (for example, not both a “History Change” trigger in GTM and your own router code). - Add event IDs. With your own
event_idon 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. - Publish your changes and clear any cache.
Common causes
- The snippet is in the site’s header code and in a tag manager.
- A plugin, app or tag template adds its own pixel, and the original snippet was never removed.
- The GTM container itself is installed twice (once by hand, once by a plugin), so every tag fires twice.
- Two tags or two pieces of code send the same event on overlapping triggers.
- A page view is sent on the initial load and again by a history-change trigger on the same page.
How to verify the fix
- In a private window, accept cookies and check the Network tab: each event appears once per Pixel ID.
- Click a button or submit a test form that sends an event, and check that it appears only once.
- Re-run the check on IsPixelWorking. The issue should be gone.
Sources
- OpenAI Developers, Measurement Pixel (installation snippet, batching of closely grouped
measurecalls,event_id, OpenAI uses the first event for a matching key and ignores later duplicates, debug option): https://developers.openai.com/ads/measurement-pixel - OpenAI Developers, Multiple Pixel IDs (load the SDK once, initialize each Pixel ID): https://developers.openai.com/ads/multiple-pixels
- Stape, OpenAI Ads Pixel tag for web GTM: https://stape.io/helpdesk/documentation/openai-ads-pixel-tag
More OpenAI guides
- OpenAI Pixel fires before cookie consent: how to fix it
- OpenAI Pixel not firing after cookie consent: how to fix it
- Repeated OpenAI event IDs drop ChatGPT Ads conversions
- OpenAI Pixel event_id missing: fix ChatGPT Ads deduplication
- ChatGPT Ads click ID (oppref) lost after an ad click
- 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