FinepherFinepher
AR
Artificial Intelligence 5 min read

OpenAI Measurement Pixel: Track ChatGPT Ad Conversions on Your Website

Aysha Farha

Aysha Farha

September 24, 2026

The OpenAI Measurement Pixel lets you send conversion events from your website so you can see what happens after someone clicks a ChatGPT ad. Here is a clear, practical guide to install it, send events, and improve matching - without the jargon.

If you are already running (or planning to run) ads on ChatGPT, the next practical step is measuring what actually happens after the click. That is what the OpenAI Measurement Pixel is for.

It is a lightweight browser SDK. You add a small script to your site, initialize it with your Pixel ID, and call a simple function when a conversion happens (a purchase, a form submit, a trial start, and so on). OpenAI can then attribute those events back to your ChatGPT ads.

This guide walks through the essentials in plain language. For the full official reference, see the OpenAI Measurement Pixel documentation.

If you are still getting familiar with ChatGPT ads themselves, start with our earlier overview: ChatGPT Ads Are Live: A Simple Guide for Business Owners.

What the Measurement Pixel does

The ChatGPT Ads Measurement Pixel runs in the visitor's browser. It helps you measure website actions that can be attributed to ads shown in ChatGPT. You get both click-through attribution (based on your configured click window) and, when available for your account, view-through attribution (a fixed one-day window after an eligible impression). When a conversion could count for both, the click takes precedence.

View-through numbers appear as a separate campaign-level metric in Ads Manager. They do not change how Conversions, CPA, bidding, or optimization work - those stay click-through based.

How to install the Pixel

Add the following snippet near the top of the <head> on every page where you want to capture conversions. Placing it early helps you avoid missing events that happen while other content is still loading.

<script>
  (function (w, d, s, u) {
    if (w.oaiq) return;
    var q = function () {
      q.q.push(arguments);
    };
    q.q = [];
    w.oaiq = q;
    var js = d.createElement(s);
    js.async = true;
    js.src = u;
    var f = d.getElementsByTagName(s)[0];
    f.parentNode.insertBefore(js, f);
  })(window, document, "script", "https://bzrcdn.openai.com/sdk/oaiq.min.js");

  oaiq("init", {
    pixelId: "<YOUR-PIXEL-ID>",
  });
</script>

pixelId is required. You create it in the conversions tab of Ads Manager. You can also pass debug: true while testing so the SDK logs activity to the browser console.

If your site requires consent before tracking, set consent before you initialize the Pixel:

oaiq("consent", false);
oaiq("init", {
  pixelId: "<YOUR-PIXEL-ID>",
});

// After the user grants measurement consent:
oaiq("consent", true);

By default the Pixel starts with consent set to true (unless a stored denial is found). When consent is false, measurement events are not sent. Turning consent back on allows future events; blocked ones are not replayed.

Content Security Policy tips

If you use a CSP, make sure these sources are allowed:

  • script-src: https://bzrcdn.openai.com (loads the SDK)

  • connect-src: https://bzr.openai.com and https://bzrcdn.openai.com (sends events and fetches config)

  • img-src: https://bzr.openai.com (image fallback for events)

You can keep using nonces or hashes; you do not need to add unsafe-inline just for the Pixel.

Sending user data for better matching

You can optionally pass a user object when you call init. This is request-scoped and helps match more conversions when a click identifier is missing. Only send hashed values - never raw email, phone, or name.

Normalize first (trim, lowercase email, strip punctuation from phone and names according to the official rules), then SHA-256 hash, and send the lowercase hex digests. Supported fields include email_sha256, phone_number_sha256, external_id_sha256, first_name_sha256, last_name_sha256, plus country, city, region, and postal_code.

OpenAI also offers automatic advanced matching: the Pixel can detect supported customer information on the page, normalize and hash it in the browser, and include it with events. Raw data is not sent. You do not need to change your implementation for this.

How to send events

When a conversion happens, call oaiq("measure", ...). Use a standard event name whenever one fits (for example order_created, checkout_started, page_viewed, contents_viewed). The event data object must include a type that matches the shape expected for that event.

Example for a completed purchase:

oaiq("measure", "order_created", {
  type: "contents",
  amount: 2599,
  currency: "USD",
});

You can also pass options such as event_id (useful for deduplicating the same conversion sent from both the browser Pixel and the server-side Conversions API) and opt_out.

For actions that do not match any standard name, use a custom event:

oaiq(
  "measure",
  "custom",
  { type: "custom" },
  { custom_event_name: "quote_requested" }
);

Custom event names must be 1-64 characters, use only letters, numbers, underscores or dashes, and must not collide with a standard event name.

Note: app_installed and app_opened are not supported by the JavaScript Pixel. Send those through the Conversions API with action_source set to mobile_app.

Multiple Pixel IDs

If the same site needs to measure for more than one advertiser or brand, load the SDK once and call oaiq("init", { pixelId: "..." }) for each ID. Use measure to send to every initialized pixel, or measureSingle when you want the event to go to only one of them. See the official Multiple Pixel IDs guide for details.

Pixel + Conversions API together

For more resilient measurement, many advertisers use both the browser Pixel and the server-side Conversions API. When the same conversion is sent from both places, use the same event name and the same event_id so OpenAI can recognize the duplicate and avoid double-counting.

Practical checklist

  • Create a Pixel / data source in Ads Manager and copy the Pixel ID.

  • Install the snippet high in the <head> on relevant pages.

  • Handle consent if your site requires it.

  • Fire standard events at the right moments (page views, product views, add to cart, checkout, purchase, etc.).

  • Add hashed user data when you have it, or rely on automatic advanced matching.

  • Use a shared event_id if you also send events via the Conversions API.

  • Test with debug: true and confirm events appear in Ads Manager.

For the broader picture of how ChatGPT ads work, pricing options, and how to get started, see ChatGPT Ads Are Live: A Simple Guide for Business Owners.

Official references:

The bottom line

The OpenAI Measurement Pixel is the straightforward way to connect what happens on your website to the ads people see in ChatGPT. Install it once, send clear events when real actions occur, and you get the feedback you need to judge performance while keeping user privacy protected. Pair it with the Conversions API when you want even stronger server-side coverage.

Related Blogs

Related Blogs