Fix guide · WordPress · easy · about 30 min

Duplicate OpenAI Pixel events on WordPress and WooCommerce

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

What this means

The same event (for example page_viewed, items_added or order_created) was sent twice for the same OpenAI Pixel ID within about a second. On WordPress this nearly always means two plugins, or a plugin and a pasted code snippet, both install the OpenAI Pixel (the ChatGPT Ads Measurement Pixel) or both send the same event.

OpenAI does throw away exact repeats: it keeps the first event with the same Pixel ID, event name and event ID. But when no event_id is passed, 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 purchase look like two purchases.

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. Log out of WordPress or use a private (incognito) window: tracking plugins can skip logged-in users or certain roles, so you may not see the duplicate while logged in.
  2. Open developer tools (F12), go to Network and filter by bzr.openai.com.
  3. Load the page and accept cookies.
  4. 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 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. Two different pid values are two pixels, which may be intended (see “More than one OpenAI Pixel”).
  5. On a WooCommerce store, click Add to cart on a product (items_added should appear once) and place a test order (order_created should appear once on the order confirmation page).

How to fix

  1. List every place the pixel or its events can come from. Right-click the page, choose View page source and search for oaiq.min.js and oaiq(. Then check:
    • Plugins > Installed Plugins for tracking plugins with OpenAI support. None is made by OpenAI; third-party options include PixelYourSite, Pixel Manager for WooCommerce, Measurement Pixel for OpenAI Ads and PixelBridge;
    • WPCode (Code Snippets > Header & Footer, and the snippet list), Elementor Pro’s Custom Code (Elementor > Custom Code), your theme’s header code field, and functions.php in a child theme;
    • your Google Tag Manager (GTM) container: OpenAI’s own GTM template, Stape’s OpenAI Ads Pixel tag or Custom HTML tags containing oaiq, and how GTM itself is added (Site Kit by Google, GTM4WP or a snippet).
  2. Choose one installation to keep. If a plugin sends both browser and server events, keep that one: PixelYourSite and Pixel Manager for WooCommerce (Pro) both document that their browser pixel and Conversions API share one event ID. If you manage all tags in GTM, keep GTM.
  3. Remove the other copies completely. 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. So:
    • deactivate the second tracking plugin, or remove the OpenAI Pixel ID from its settings;
    • delete the whole snippet from WPCode, Elementor Custom Code, theme fields or theme files, not only the <script> line;
    • in GTM, delete OpenAI tags for any events your plugin already sends.
  4. Make sure GTM is added only once. In Site Kit, the Let Site Kit place code on your site toggle under Site Kit > Settings > Connected Services > Tag Manager > Edit decides whether Site Kit adds the container. GTM4WP and theme snippets can add it too. Keep one. In the Network tab, filter by gtm.js: each container ID should load once, or every tag in it can fire twice.
  5. Check for overlapping event calls, not just base code:
    • PixelYourSite sends page_viewed on every page and order_created on the WooCommerce “Thank You” page by itself, and Pixel Manager maps the same store actions automatically. Do not add a custom event, GTM tag or code for an action the plugin already sends.
    • Code a developer added to the WooCommerce order confirmation (for example on the woocommerce_thankyou hook) sends a second order_created when a plugin also sends one.
    • A form plugin’s success event plus a snippet on the thank-you page both send lead_created. Keep one.
  6. Add event IDs to your own calls. If you keep your own order_created code, use the WooCommerce order number as event_id (for example order_1234). An accidental second call, or a customer reloading the confirmation page, then carries the same ID and OpenAI keeps only the first. That is a safety net, not a replacement for removing the extra copy. See the WordPress guide to “OpenAI events have no event ID”.
  7. Clear every cache (plugin, host and CDN), so visitors stop getting pages with the old code.

Common causes

  • Two tracking plugins with OpenAI support are active with the same Pixel ID, for example PixelYourSite and Pixel Manager for WooCommerce.
  • A plugin installs the pixel, and OpenAI’s snippet is also pasted into WPCode, Elementor Custom Code or the theme.
  • The pixel is in a plugin and in a GTM tag.
  • GTM is added twice, for example by Site Kit or GTM4WP and by a snippet in the theme.
  • A plugin’s automatic events overlap with custom events or developer code for the same action.

How to verify the fix

  1. Clear all caches. In a private window, accept cookies and check that each event appears once per Pixel ID: on page load, after Add to cart, and on the order confirmation page after a test order.
  2. Re-run the check on IsPixelWorking. The issue should be gone.

Sources

More OpenAI guides