Fix guide · Any website · easy · about 20 min

Two OpenAI Pixel IDs on one site: when it's fine, how to fix

For the finding “More than one OpenAI Pixel”.

What this means

Your page initializes more than one OpenAI Pixel ID. Each oaiq("measure", ...) call is then sent to every Pixel ID that is initialized at that moment.

That can be exactly what you want: OpenAI documents multiple Pixel IDs for a website that measures conversions for more than one advertiser, brand or integration partner, for example your own ad account and an agency’s. If nobody planned it, though, it usually means an old or foreign pixel is still installed, and your conversions are split between two data sources.

Why it can cost you money:

  • If your campaigns use one data source and part of your events go to another, conversions are missing from the one that matters.
  • A pixel belonging to a former agency or a test account keeps receiving your visitors’ data.
  • Two installations often come with duplicate events (see “Duplicate OpenAI events”).

How to confirm it yourself

  1. Open a private (incognito) window, open developer tools (F12), go to the Network tab and filter by bzr.openai.com.
  2. Load the page and accept cookies.
  3. Look at the pid value in each request address: that is the Pixel ID. More than one value means more than one pixel.
  4. Compare each Pixel ID with the one shown in the conversions tab of your ChatGPT Ads Manager. Write down any ID you do not recognize.
  5. Search the page source and your tag manager for oaiq("init" to find where each ID is set.

How to fix

If the second pixel is not yours or no longer needed:

  1. Find where it is initialized: site header or theme code, a tag manager tag, a plugin or app, or code left from an earlier agency or test setup.
  2. Remove its oaiq("init", ...) call (or the whole tag). If it came with its own copy of the snippet and its own measure calls, remove those too.
  3. Publish and clear any cache.

If you need both pixels (for example agency and client):

  1. Load the SDK once and initialize each Pixel ID, as OpenAI describes:

    oaiq("init", { pixelId: "<PIXEL-ID-A>" });
    oaiq("init", { pixelId: "<PIXEL-ID-B>" });
  2. Decide which events each pixel should get. measure sends to every initialized pixel. To send an event to only one of them, use measureSingle with the Pixel ID before the event name:

    oaiq("measureSingle", "<PIXEL-ID-A>", "order_created",
      { type: "contents", amount: 2599, currency: "USD" },
      { event_id: "order_12345" });
  3. Initialize both pixels before the first event. OpenAI notes that a pixel initialized later does not receive earlier events.

  4. If you update user data after login, call init again with the complete user object and always include the intended pixelId when a page has more than one pixel.

  5. If you also send server events, send each one with the Pixel ID it belongs to: OpenAI deduplicates per Pixel ID, event name and event ID.

  6. If you use a tag manager template, check whether it supports more than one Pixel ID. Stape’s OpenAI Ads Pixel tag documentation, for example, says that currently only one Pixel ID is supported on the page.

Common causes

  • An agency or freelancer installed their own pixel and it was never removed.
  • A test pixel from setup stayed in the code.
  • A plugin or app installs a pixel next to the one you pasted by hand.
  • Two tag manager containers each initialize a different Pixel ID.

How to verify the fix

  1. In the Network tab, only the Pixel IDs you expect appear in pid.
  2. If you kept two pixels on purpose, each one receives only the events you meant for it.
  3. Re-run the check on IsPixelWorking. If two pixels are intended, you can ignore this finding; it is reported with low severity.

Sources

More OpenAI guides