Fix guide · Any website · medium · about 45 min

Repeated OpenAI event IDs drop ChatGPT Ads conversions

For the finding “OpenAI event IDs repeat across visits”.

What this means

Your site sent the same event ID with the OpenAI Pixel on two separate visits. An event ID should name one action by one visitor, such as one order or one lead.

OpenAI matches duplicates on the Pixel ID, the event name and the event ID, and it keeps the first event it receives for that combination and ignores later ones. So when every visitor’s order_created carries the same ID, OpenAI can treat all of them as one conversion.

Why it costs you money:

  • Real conversions disappear from ChatGPT Ads reporting, so campaigns look worse than they are.
  • Conversion-optimized campaigns learn from far fewer conversions than really happened.
  • Any server copies of these events (Conversions API) are affected the same way, because they share the ID.

How to confirm it yourself

  1. Open your page in a private (incognito) window, open developer tools (F12), go to Network and filter by bzr.openai.com. Accept cookies and trigger the event (for example, submit a test lead).
  2. Click the request and find the event in the payload’s events list. Note its id.
  3. Close the window, open a new private window and repeat. If the second visit sends the same id for the same event type, the ID repeats across visits.
  4. Search your code and tag manager for the call that sends this event, for example oaiq("measure", "lead_created", and look at where its event_id comes from.

How to fix

Every action needs its own ID. The only time two events should share an ID is when they describe the same action from two sides: the browser copy and the server copy of one purchase.

  1. Find where the ID comes from. Typical sources of repeated IDs:

    • a fixed value typed into the code or a tag manager field, for example event_id: "purchase" or a campaign name;
    • an ID generated once when the page was built or cached, not when the visitor acted. A page cache, CDN or static site generator then serves the same “random” ID to everyone;
    • a value that is the same for many visitors, such as a product ID, a form ID or the page URL;
    • a tag manager variable that keeps its value for the whole session or is stored in a cookie.
  2. Generate the ID at the moment of the action, in the browser or on your server. Good sources:

    • purchases: the order number or transaction ID (order_12345);
    • leads and sign-ups: the form submission ID your backend creates, or a random value created when the form is submitted;
    • page views and clicks: a random value created when the event fires, for example crypto.randomUUID() in the browser.
    const eventId = crypto.randomUUID();
    oaiq("measure", "lead_created", { type: "customer_action" }, { event_id: eventId });
    // Send eventId with the form data, so your server can reuse it in its Conversions API event.
  3. Keep browser and server in step. If your server sends the same conversion through the Conversions API, it must use the same per-action ID as id, not a value of its own and not a shared constant.

  4. Retries are the one exception. OpenAI asks you to reuse the same ID when your server retries sending the same event. That is the same action, so the same ID is correct.

  5. If the ID comes from a tag manager: use a variable that creates a new value per event, such as Stape’s Unique Event ID variable, not one stored for the session.

  6. Publish your changes and purge page and CDN caches, so no cached page keeps the old ID.

Common causes

  • The event ID field in a tag manager template holds a fixed text instead of a variable.
  • The ID is generated by the server when the page is rendered, and the page is then cached.
  • The site uses a product, form or page identifier as the event ID.
  • A tag manager variable keeps its value for the whole session, or reads it from a cookie that lives longer than one action.

How to verify the fix

  1. Repeat the test with two private windows: the same event now carries a different id on each visit.
  2. For one test conversion, the browser id and the server id are identical.
  3. Re-run the check on IsPixelWorking. The issue should be gone.

Sources

More OpenAI guides