Fix guide · Webflow · advanced · about 60 min

OpenAI Pixel events have no event ID on Webflow

For the finding “OpenAI events have no event ID”. Also for: Any website, Shopify, WordPress, Framer.

What this means

Each OpenAI Pixel event can carry an event ID that your site sets: the event_id option in the fourth argument of oaiq("measure", ...). Your site calls measure without one. The requests still contain an ID, because the pixel then puts a random value in the event’s id field by itself (OpenAI does not document this, but you can see it in the request payload), but that value exists only in the visitor’s browser. Your server never learns it, so it cannot send the same ID with its copy of the event.

Whether this costs you money depends on one question: does your site also send these events to OpenAI from a server, through the OpenAI Conversions API?

  • Yes, or you are not sure: OpenAI treats a browser event and a server event as the same conversion when they share the Pixel ID, the event name and the event ID. With a random browser ID they never match, so the same lead or order can be counted twice.
  • No, browser pixel only: there is nothing to deduplicate yet. It matters the day you add the Conversions API.

Webflow has no built-in OpenAI integration and runs no server code of its own, unless you use Webflow Cloud or another backend. On a Webflow site, server events only exist if you or a tool added them: server-side Google Tag Manager (GTM), a webhook or automation that forwards form submissions to OpenAI, a third-party tool, or your own backend. If none of these is in place, this issue can wait.

We cannot see server-to-server traffic from a browser, so we cannot tell whether your Conversions API works. We only see whether your site passes its own event IDs to the pixel.

How to confirm it yourself

Because the pixel fills in an ID on its own, the Network tab cannot tell you whether your site sets one. Look at the calls instead.

  1. Search Site settings > Custom code, each page’s Page settings > Custom code, your Code Embeds and your GTM tags for oaiq("measure" (or oaiq('measure').

  2. For each call, look for a fourth argument with event_id:

    // No event ID: the pixel makes one up
    oaiq("measure", "lead_created", { type: "customer_action" });
    
    // Your own event ID
    oaiq("measure", "lead_created", { type: "customer_action" }, { event_id: "lead-8f3a2c" });
  3. In GTM, open the tag. OpenAI’s own template has an Event ID field (“Leave blank unless another system will send the same conversion server-side”). In Stape’s OpenAI Ads Pixel template, the ID goes in the Server-side tracking settings section. An empty field means the pixel uses its own random value.

How to fix

OpenAI deduplicates a browser event and a server event when both use the same Pixel ID, the same event name (for custom events, the same custom_event_name) and the same event ID, and keeps the first one it receives. The ID must be created once and shared by both sides. Never reuse a fixed value: OpenAI keeps only the first event with a given ID, so a repeated ID silently drops real conversions.

Route 1: Google Tag Manager with server-side GTM. If the pixel runs as a GTM tag:

  1. Create a variable that produces a unique ID per event, for example Stape’s Unique Event ID variable from the Community Template Gallery.
  2. Put it into the tag’s event ID field: Event ID in OpenAI’s template, or the Server-side tracking settings section in Stape’s template.
  3. Map the same value to the event ID of the server event, for example the Event ID parameter of Stape’s OpenAI Ads Events API tag in your server container.

Route 2: form leads sent from a webhook or automation. Webflow can send each form submission to a webhook or an App, with the submitted field values. Webflow forms submit without a page reload, so the browser event has to come from code that runs when the form succeeds.

  1. Add a text input to the form, set its Name to event_id, and hide it (for example with display: none, as in Webflow’s guide to hidden honeypot fields).

  2. Add this to Site settings > Custom code > Footer code (or the page’s Before </body> tag field). It fills the field with a new ID and sends lead_created with the same ID once the form’s Success message appears:

    <script>
      document.querySelectorAll(".w-form").forEach(function (block) {
        var done = block.querySelector(".w-form-done");
        var field = block.querySelector('input[name="event_id"]');
        if (!done || !field) return;
        var id = "lead-" + Date.now() + "-" + Math.random().toString(36).slice(2, 10);
        field.value = id;
        var sent = false;
        new MutationObserver(function () {
          if (sent || getComputedStyle(done).display === "none") return;
          sent = true;
          if (window.oaiq) {
            oaiq("measure", "lead_created", { type: "customer_action" }, { event_id: id });
          }
        }).observe(done, { attributes: true, attributeFilter: ["style"] });
      });
    </script>

    .w-form-done is the Success message element in Webflow’s published code. If the form is set to redirect to another page after submission (form Settings panel), Webflow redirects instead of showing that message, and this code sends nothing: switch the form to its Success message, or have a developer adapt the code.

  3. In your webhook receiver or automation, send lead_created to the OpenAI Conversions API with id set to the submitted event_id value and the same Pixel ID (pid).

  4. Remove any other lead_created event for the same form, such as a GTM tag or a thank-you page snippet, or OpenAI receives two browser leads.

Route 3: a third-party tool. A tool that sends both browser and server events can share IDs between them, but only for the browser events it sends itself. A separate copy of the pixel in Webflow’s custom code keeps sending random IDs (and usually also shows up as “Duplicate OpenAI events”). Check the tool’s documentation and remove the other copy.

Common causes

  • OpenAI’s installation snippet and example measure calls were copied without the optional fourth argument.
  • A server-side setup was added later, and the browser calls in Webflow’s custom code were never updated.
  • In GTM, the event ID field of the web tag is empty, or the server tag reads a different variable.
  • The browser and the server each generate their own ID, so the two never match.

How to verify the fix

  1. Every oaiq("measure", ...) call for your key events passes an event_id, and the value changes from one action to the next.
  2. Submit a test form: the id of the lead_created event in the browser request (Network tab, filter bzr.openai.com) equals the event_id your server receives and sends.
  3. With access to the Advertiser API, OpenAI’s recent-events endpoint (GET /v1/conversions/events?pid=<PIXEL-ID>) lists a sample of events from roughly the last 15 minutes with their channel: pixel_sdk for the browser and server_to_server for your server.
  4. Re-run the check on IsPixelWorking. The issue should be gone.

Sources

More OpenAI guides