Guide

How to Set Up ChatGPT Ads Conversion Tracking

Pixel, Conversions API, deduplication and the click identifier most server-side setups lose — in the order you should do them, for any website.

Short answer

To track ChatGPT Ads conversions: create a Pixel ID and Conversions API key in the conversions area of OpenAI Ads Manager; add the OpenAI measurement pixel to the <head> of every page; fire standard events such as lead_created or order_created at the moment they happen; send the same events from your server through the Conversions API with the identical event ID so OpenAI deduplicates them; forward the oppref click identifier with server events; then test a real conversion before launching. On WordPress, the free ConvoPixel plugin does all of this for you.

Before you start

Ads in ChatGPT appear below answers for logged-in users on the Free and Go plans. OpenAI offers impression (CPM), click (CPC) and conversion-optimised click (oCPC) bidding. Conversion-optimised campaigns require active tracking through the pixel, the Conversions API or both, and optimise towards exactly one standard event — which cannot be changed after the campaign is created (OpenAI developer docs). So tracking is not optional; it decides what the campaign learns.

You need:

  • Access to OpenAI Ads Manager for your ad account.
  • The ability to edit your site's <head>, or a tag manager.
  • For server events, access to your server code, a server-side tag manager, or a plugin.

Step 1 — Create a Pixel ID and Conversions API key

In Ads Manager, create a data source in the conversions area. That gives you a Pixel ID. From the same place, generate a Conversions API key for server-to-server events. Treat the key like a password: it belongs on your server, never in page code.

Step 2 — Install the measurement pixel on every page

The pixel is an asynchronous script that creates a global oaiq function. Place it as high in the <head> as you can so early conversions are not lost, then initialise it:

oaiq("init", { pixelId: "YOUR-PIXEL-ID" });

It belongs on every page, not just the thank-you page, because it also captures the click identifier described in step 5.

Step 3 — Fire the right standard events

OpenAI supports these standard events (measurement pixel docs):

Event Use it for
page_viewed Page loads
contents_viewed Product or content views
items_added Add to cart
checkout_started Checkout begun
order_created Purchase completed
lead_created Form submitted, enquiry sent
registration_completed Account or event sign-up
appointment_scheduled Booking made
subscription_created Paid subscription started
trial_started Free trial started

Custom events are allowed too, but custom events cannot be optimisation goals for conversion-optimised campaigns. Map your important conversions to the closest standard event. Give every event a unique event ID — an order number works well for purchases.

Step 4 — Send the same events through the Conversions API

Browser tracking misses conversions to ad blockers, browser restrictions and people closing the tab before the thank-you page loads. The Conversions API sends conversions from your server too. OpenAI recommends using both together with the same event ID for the same conversion, so it can deduplicate them (OpenAI Help Center).

The deduplication rule is simple and unforgiving: same Pixel ID, same event name, same event ID. Get any of them wrong and every conversion counts twice.

Step 5 — Keep the oppref click identifier

When someone clicks a ChatGPT ad, an oppref parameter is added to your landing-page URL. The pixel captures it and stores it in a first-party __oppref cookie for 30 days, refreshing it on each new click. Server events need that value forwarded with them, or OpenAI cannot connect the conversion to the click.

This is the most common silent failure in server-side setups: conversions arrive, but none are attributed. Read the cookie on the server (or pass it through your checkout or form) and include it in every API event.

Step 6 — Handle consent

Where consent is required, set it before initialisation and only enable measurement once the visitor agrees:

oaiq("consent", false); // before init, if consent is required oaiq("consent", true); // after the visitor accepts

Customer data such as email is normalised and hashed with SHA-256 in the browser before it is sent; raw customer information is not transmitted.

Step 7 — Test before you spend

  1. Visit your site through a URL with a test oppref value, or click a live ad.
  2. Complete a real conversion — a test order or form submission.
  3. Check Ads Manager for the event, and confirm it appears once, not twice.
  4. Check your server logs or tag manager for the API call and its response.

Doing it on WordPress and WooCommerce

ConvoPixel is a free WordPress plugin I built that does all of the above: it installs the pixel, sends server events through the Conversions API with a background queue, shares event IDs for deduplication, preserves oppref, hashes customer data, and detects leads from ten common form plugins plus WooCommerce purchases. Setup is pasting a Pixel ID and API key.

If you would rather have someone set it up and run the campaigns, see ChatGPT Ads consulting.

Frequently asked questions

Do I need both the pixel and the Conversions API?

You can use either, but OpenAI recommends both with the same event ID, so conversions missed by the browser are caught by the server and nothing is counted twice.

Which event should I optimise for?

The standard event closest to revenue that fires often enough to learn from — usually order_created for shops and lead_created for lead generation. Custom events cannot be optimisation goals.

Why are my server-side ChatGPT Ads conversions not attributed?

Usually because the oppref click identifier is not being forwarded with the server event. Read it from the __oppref cookie or the landing URL and include it.

Is there a WordPress plugin for ChatGPT Ads tracking?

Yes — ConvoPixel is free, works with or without WooCommerce, and supports ten form plugins, calls, chat clicks, downloads and sign-ups.

Related

Let's Talk


Let Me Help You Grow Your Business.

Book your free performance analysis call. No pressure, no obligations, just honest insights about your marketing performance.

Let’s Talk