Fix guide · Framer · easy · about 20 min
Duplicate OpenAI Pixel events on Framer: how to fix
For the finding “Duplicate OpenAI events”. Also for: Any website, Shopify, WordPress, Webflow.
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. On Framer, this nearly always means the pixel or one of its event calls is installed in two places, or a script runs more often than intended.
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 (OpenAI does not document this, but you can see it in the request payload), 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 data and may optimize toward the wrong results.
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 your published site in a private (incognito) window, open developer tools (F12), go to Network and filter by
bzr.openai.com. - Accept cookies.
- Click the requests and look at the payload: each 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 thepidvalue in the request address. Two events with the sametypefor the samepidat almost the same moment are a duplicate. Two differentpidvalues are two pixels, which is a separate finding (“More than one OpenAI Pixel”). - Click through to another page and submit a test form. Each page change and each submission should produce one event per Pixel ID, not two.
- If your OpenAI tags are in Google Tag Manager (GTM), open Preview mode and look for two OpenAI tags firing on the same event.
How to fix
- Check every place a Framer site can send OpenAI events. Search the published page source for
oaiq.min.jsandoaiq(, then go through:- Site Settings > Code (some Framer help pages call it Project Settings > Custom Code). Each entry is a separate script with its own Placement, Pages and Run settings, so open every entry, including ones limited to selected pages.
- Page-level custom code in each page’s settings. A page can carry a copy on top of the site-wide one.
- Embeds, code components, code overrides and marketplace components on the canvas.
- Plugins or third-party tools that install the OpenAI pixel for you.
- Your GTM container: Custom HTML tags containing
oaiq, OpenAI’s template (OpenAI Ads Measurement Pixel) and Stape’s OpenAI Ads Pixel tag.
- Check that GTM is installed only once. Framer’s Cookie Banner loads GTM itself when its GTM ID property is filled in. If a GTM snippet is also pasted into custom code, remove the snippet; the container should not load twice. If the Network tab shows
gtm.jsrequests for two different container IDs, check both: if each holds an OpenAI tag, every event goes out twice. - Keep one installation, remove the rest. If you use Framer’s Cookie Banner, keep the GTM copy (it is the one that waits for consent) and remove the pixel from custom code and embeds. 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 entry, not just the<script>line. - Check how often your scripts run. Framer changes pages without a full page reload. Each custom code entry’s Run setting decides whether it runs Once or on every page visit:
- Framer recommends Once for code that adds event listeners, such as a script that listens for Framer’s
framer:formsubmitevent and sendslead_created. Set listener scripts to Once, then test: click through a few pages, submit the form once, and count thelead_createdevents. - Only one thing should send
page_viewedfor each page change. For example, not both a custom code entry that callsoaiq("measure", "page_viewed", ...)on every page visit and a GTM tag on a History Change trigger. - In GTM, a
page_viewedtag with both acookie_consent_updatetrigger and an Initialization trigger should fire Once per page.
- Framer recommends Once for code that adds event listeners, such as a script that listens for Framer’s
- Check event calls as well as the base code. Framer forms can redirect on submit to a thank-you page. If one tag sends
lead_createdwhen the form is submitted and another sends it when the thank-you page loads, keep one. - 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. See OpenAI events have no event ID. - Publish the Framer site, and the GTM container if you changed it.
Common causes
- The snippet is in Site Settings > Code and in a GTM tag.
- The GTM container is loaded by the Cookie Banner and again by a snippet in custom code.
- A site-wide custom code entry and a page-level entry both hold the pixel on the same page.
- A form or page view script is set to run on every page visit while another tag sends the same event.
lead_createdis sent on form submission and again on the thank-you page.- A template or marketplace component came with a pixel already embedded.
How to verify the fix
- In a private window on the published site, accept cookies and check that each event appears once per Pixel ID: on page load, after moving through a few pages, and after a test form submission.
- 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, first event for a matching key wins): https://developers.openai.com/ads/measurement-pixel - OpenAI on GitHub, Ads Measurement Pixel GTM template: https://github.com/openai/ads-measurement-pixel-gtm-template
- Stape, OpenAI Ads Pixel tag for web GTM (third-party): https://stape.io/helpdesk/documentation/openai-ads-pixel-tag
- Framer Help, How to add custom code (placement, page selection, “Once” for event listeners, “Run on every page visit”): https://www.framer.com/help/articles/how-to-add-custom-code/
- Framer Help, Add Google Tag Manager to your site (Site Settings > Code): https://www.framer.com/help/articles/how-to-add-google-tag-manager-to-your-site/
- Framer Academy, Custom Code (page-level custom code): https://www.framer.com/academy/lessons/custom-code
- Framer Help, How to track links and forms in Framer (
framer:formsubmitevent): https://www.framer.com/help/articles/how-to-track-links-and-forms-in-framer/ - Framer Updates, Forms (redirect on submit): https://www.framer.com/updates/forms
- Framer Academy, Add a Cookie Banner to your site in Framer (GTM container ID): https://www.framer.com/academy/lessons/cookie-banner-component
- Google Tag Manager Help, History change trigger: https://support.google.com/tagmanager/answer/7679322
- IsPixelWorking live test, 2026-10-01: on published Framer sites, clicking an internal link changed the address with
history.pushStateand did not load a new document. On a site with the Cookie Banner and a GTM ID,gtm.jswas requested by Framer’s site script, with no GTM snippet in the page HTML.
More OpenAI guides
- OpenAI Pixel fires before consent on Framer: how to fix
- OpenAI Pixel not firing after consent on Framer: how to fix
- Repeated OpenAI event IDs drop ChatGPT Ads conversions
- OpenAI Pixel event_id missing on Framer: fix deduplication
- ChatGPT Ads click ID (oppref) lost on Framer: how to fix
- 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