Skip to content
Server-Side Tracking11 min read

ChatGPT Ads Conversion Tracking: OpenAI Pixel and Conversions API Setup in GTM

How to track ChatGPT Ads conversions with the OpenAI Pixel in a web GTM container and the Conversions API in a server container, with one shared event ID, shown with screenshots from a live setup.

Imran Ahmed

Imran Ahmed

Google Ads & Conversion Tracking Specialist

Browser and Server Flow
STEP 1

Web GTM Pixel

  • • One tag per event
  • • Pixel ID from Ads Manager
  • • Event ID set on each
STEP 2

Server GTM API

  • • One Conversions API tag
  • • Same Pixel ID and event ID
  • • Hashed customer identifiers
STEP 3

Test in Event Stream

  • • Start a Pixel test session
  • • Compare browser and server events
  • • Check amount and identifiers
STEP 4

Conversion Events

  • • Create a setting per event
  • • Link it to the campaign
  • • Read the Conversions column

ChatGPT Ads conversion tracking has three parts: a data source that sends events (the OpenAI Measurement Pixel in the browser, the Conversions API from a server, or both), a conversion event setting in Ads Manager, and a campaign that uses that setting. When you send the same conversion from both the Pixel and the Conversions API, both must carry the same event name, the same event ID and the same Pixel ID, otherwise OpenAI cannot treat them as one conversion.

I set up the OpenAI Ads Pixel and the Conversions API through web and server Google Tag Manager containers for an e-commerce store, and the screenshots in this guide are from that live setup, with the store's name and IDs blurred. Every rule below comes from OpenAI's documentation or Stape's documentation for the two GTM templates used.

OpenAI Ads is new and Ads Manager carries a Beta label in these screenshots, so screens, field names and limits may change.

1. What Do You Need to Track ChatGPT Ads Conversions?

You need a Pixel ID in every case, even for a server-only integration. The Conversions API also needs its own API key, which stays on the server. Both come from the Conversions area of Ads Manager.

PartWhere it livesWhat it does
OpenAI Pixel tagsWeb GTM containerSend page, product, cart, checkout and order events from the browser
Conversions API tagServer GTM containerSends the same events from your server with customer identifiers
Event IDBoth containersLets OpenAI count a browser event and a server event as one
Conversion event settingAds Manager > Conversions > Conversion EventsTurns a received event into a conversion that campaigns can report on
CampaignAds Manager > CampaignsUses the conversion event for reporting or optimization

If you already run the Meta Pixel with the Conversions API, the logic will feel familiar, but the names and limits differ. My guide to Meta Pixel and Conversions API deduplication covers the Meta side.

2. How Do the OpenAI Pixel and Conversions API Work Together?

The Pixel runs in the visitor's browser and the Conversions API sends events from your server. OpenAI describes the API as a complement to the Pixel that helps you measure without depending only on browser delivery.

Two identifiers matter for attribution:

  • oppref: a reference that arrives on the landing page URL with an ad click. The Pixel captures it and stores it in a first-party __oppref cookie. The Conversions API does not capture it for you.
  • obref: a browser reference the Pixel keeps in a first-party __obref cookie. In a hybrid setup it is passed, unchanged, inside the user object of the server event.

OpenAI recommends sending all conversion events through the API, not only those with an oppref.

Standard events for a store

This setup uses page_viewed, contents_viewed, items_added, checkout_started and order_created. OpenAI also lists lead, registration, appointment, subscription and trial events, plus custom events. Custom events cannot be used for conversion optimization.

3. How Do You Set Up the OpenAI Pixel Tags in a Web GTM Container?

This setup uses the OpenAI Ads Pixel by Stape template from the GTM Template Gallery. The live container has five tags, one per event.

  1. Step 1Add the OpenAI Ads Pixel by Stape template to the web container and enter the Pixel ID from Ads Manager.
  2. Step 2Create the page view tag on an Initialization trigger for all pages, so the Pixel loads before the other events.
  3. Step 3Create one tag each for view item, add to cart, begin checkout and purchase, on your existing GA4 ecommerce triggers.
  4. Step 4Set the event name with Inherit from DataLayer, which maps GA4 names, or Override, where you pick the event.
  5. Step 5Keep Automatic Data Layer Mapping on so the tag reads items, value and currency from the GA4 ecommerce data layer.
  6. Step 6In Server-Side Tracking Settings, set the Event ID. Section 5 explains what to put there.

With Inherit from DataLayer, Stape documents this mapping:

Web GTM container showing five OpenAI Ads Pixel by Stape tags for page viewed, contents viewed, items added, checkout started and order created
Web container from the live setup: five OpenAI Ads Pixel by Stape tags, one per event, each on its own trigger.
GA4 event in the data layerOpenAI Pixel event
page_viewpage_viewed
view_itemcontents_viewed
add_to_cartitems_added
begin_checkoutcheckout_started
purchaseorder_created

Where consent is required, OpenAI says to configure the Pixel's consent controls before it initializes. The Stape tag supports a manual consent field or Google Consent Mode, where it checks ad_storage.

4. How Do You Set Up the Conversions API Tag in a Server GTM Container?

The server side uses the OpenAI Ads Conversions API by Stape template. In the live server container one tag sends all events, because the template can inherit the event name from the incoming GA4 event.

  1. Step 1Add the template to the server container and create one tag.
  2. Step 2Set Event Name Setup Method. Inherit from client applies the same GA4 mapping as the web tag.
  3. Step 3Enter the same Pixel ID as the web tags and the Conversions API key.
  4. Step 4Set Action Source to Web. A source URL is then required on every event.
  5. Step 5Leave Automap Server Event Data Parameters on. It fills the timestamp, the source URL from page_location, the event ID from event_id in the event data, and the click ID from the oppref sources.
  6. Step 6Leave Automap User Data Parameters and Automap Event Parameters on, and fire the tag only on the events you want OpenAI to receive.
Server GTM container with the OpenAI Ads Conversions API by Stape tag highlighted among other server-side tags
Server container from the live setup: one OpenAI Ads Conversions API by Stape tag handles all events. The other tags in the container are blurred on purpose.

Timestamps have a window

OpenAI accepts an event timestamp from the last 7 days and no more than 10 minutes in the future.

Not sure a server container is worth running? Read when server-side tracking is worth it first.

5. How Do You Deduplicate Pixel and Server Events With an Event ID?

For duplicate matching OpenAI uses your Pixel ID, the event name and the event ID. It keeps the first event it receives for a matching key and ignores later duplicates.

So the browser event and the server event for one order need:

  • the same Pixel ID
  • the same event name, for example order_created
  • the same event ID, sent as event_id by the Pixel and as id by the Conversions API
  • for custom events, the same custom_event_name as well

OpenAI suggests the actual order ID or another unique ID. In GTM that means one variable both containers read: the web tag takes it in its Event ID field, and the same value reaches the server as event_id in the event data.

Watch the autogenerate option

The Stape server tag can generate a random event ID when none is found, because the API requires one on every event. Stape says that if you also send events through the Pixel, either switch this off or pass your own event ID to keep deduplication working.

What the Pixel sends for an order (from OpenAI's documentation)javascript
oaiq(
  "measure",
  "order_created",
  { type: "contents", amount: 8900, currency: "USD" },
  { event_id: "order_12345" }
);

// Server event for the same order:
//   "id": "order_12345", "type": "order_created"
// amount is in the currency's minor unit: 8900 = USD 89.00

6. Which Customer Identifiers Should You Send, and How?

OpenAI accepts customer information in a user object on each event:

  • Email, phone number, external ID, first name and last name must be normalized and then hashed with SHA-256. Do not send them raw.
  • City, region, postal code and country are sent as plain values.
  • IP address and user agent are sent without hashing.

The Stape server tag hashes email, phone, external ID and names for you and leaves already hashed values alone. In the browser, the Stape tag has an Advanced Matching option, and OpenAI says customer information helps match a conversion when a click identifier is unavailable.

Follow your site's consent requirements before collecting or forwarding these values.

7. How Do You Test Events in Event Stream?

Ads Manager has a Pixel test session that filters Event Stream to your own test traffic:

  1. 1Go to Conversions > Data Source.
  2. 2Open the three-dot menu for the Web Pixel and select Test.
  3. 3Enter a page URL where the Pixel is installed and select Start testing.
  4. 4Take actions on the site, then return to Event Stream. Events from the session carry a Test label.

What to check on each event:

  • the event name is the standard name you expect
  • the browser event and the server event for the same action show the same event ID
  • the order amount and currency are right, remembering the minor unit rule

Test labeling lasts up to 30 minutes, events may be delayed or sampled, and test events still count in normal analytics.

On the server, the API has a validate_only flag, exposed in the Stape tag as Validate Only. A validated request is checked but not saved, so switch it off after testing.

8. What Should the Conversion Events Tab Look Like?

Sending an event and creating a conversion event setting are separate steps. Settings live under Conversions > Conversion Events. In the live setup all five events have one.

OpenAI Ads Manager Conversion Events tab listing order created, checkout started, items added, contents viewed and page viewed with identifier coverage and event counts
Conversion Events shortly after launch. Order Created shows 100% in the Identifier cover. column, the upper-funnel events between 2% and 13%. Pixel name and event IDs are blurred.
OpenAI Ads Manager Conversion Events tab at a later date with higher event counts for all five events
The same tab later, with more volume. Order Created shows 35% and the other events between 4% and 8%.

What the screenshots show: all five events arrive under one Pixel, Order Created is the one used by campaigns, and it has the highest figure in the Identifier cover. column both times. That figure is lower in the second screenshot, so it moves with volume.

I could not find a definition of this column in OpenAI's public documentation, so I will not give one. The pattern fits how data is collected: a buyer gives an email and address at checkout, while most page viewers have given nothing. That is my reading, not OpenAI's definition.

OpenAI says a conversion-optimized campaign needs exactly one active standard conversion event setting when it is created, and that it cannot be changed afterwards.

9. How Do You Confirm Conversions Reach the Campaign Report?

The last check is the campaign list. Clicks and impressions campaigns can track conversions without changing their objective.

OpenAI Ads Manager campaign list with impressions, clicks and conversions columns and one recorded conversion highlighted
Campaign list from the live setup. One conversion is recorded against a campaign. Campaign names and spend are blurred.

This screenshot shows one thing: a conversion recorded against a campaign, so the event, the setting and the campaign are connected. It is not a performance result.

According to OpenAI, the Conversions metric is click-through. Where view-through attribution is available, it is reported as a separate campaign-level metric.

10. What Are the Common Mistakes in OpenAI Ads Tracking?

These follow directly from the documented rules above.

MistakeWhat happensFix
Different event ID in browser and serverOpenAI cannot match the two events as one conversionOne variable for the event ID, read by both containers
Server tag generates its own ID while the Pixel also firesThe random ID never matches the browser IDPass your own event ID or switch the option off
Amount sent as 89.00OpenAI expects integers in the minor unitCheck the amount on a test order in Event Stream
Events sent but no conversion event settingEvents arrive but are not counted as conversionsCreate the setting under Conversion Events
Validate Only left onServer events are checked but not savedSwitch it off after testing
No oppref on server eventsThe server event carries no click referenceLet the server tag read the cookie or URL parameter

If you want this checked or built on your own store, see my conversion tracking service or send me a message.

Frequently Asked Questions

Do I need both the OpenAI Pixel and the Conversions API?

No. OpenAI lets you use the Measurement Pixel, the Conversions API, or both. If you send the same conversion both ways, both events need the same event name, event ID and Pixel ID.

How does OpenAI deduplicate Pixel and Conversions API events?

OpenAI matches duplicates on the Pixel ID, the event name and the event ID. The Pixel sends the ID as event_id and the Conversions API sends it as id. OpenAI keeps the first event it receives for a matching key and ignores later duplicates.

Can I set up ChatGPT Ads tracking in Google Tag Manager?

Yes. The GTM Template Gallery has an OpenAI Ads Pixel by Stape template for web containers and an OpenAI Ads Conversions API by Stape template for server containers.

Why are my events arriving but no conversions showing?

In OpenAI Ads, sending an event and creating a conversion event setting are separate steps. Check that a setting exists for that event under Conversions > Conversion Events and that the campaign uses it. Also confirm the server tag is not still in validate-only mode.

Key Takeaways

  • ChatGPT Ads tracking needs a data source, a conversion event setting and a campaign that uses it.
  • Run the OpenAI Pixel in the web container and the Conversions API in the server container with the same Pixel ID.
  • Deduplication uses Pixel ID, event name and event ID. The first event received is kept.
  • Hash email, phone, names and external ID with SHA-256. Send location, IP address and user agent unhashed.
  • Test in Event Stream, then confirm the Conversion Events tab and the campaign Conversions column.
Professional Implementation

Running ChatGPT Ads Without Reliable Conversion Data?

I set up the OpenAI Pixel and Conversions API through your web and server GTM containers, with one shared event ID and tested events, so Ads Manager receives each conversion once.

Imran Ahmed

Written by Imran Ahmed

Google Ads & Conversion Tracking Specialist

Founder of Imranlytics. Specializes in GA4 infrastructure, server-side tracking, and data-driven Google Ads management for scaling businesses.

CONTINUE READING

Related Technical Guides

BROWSER (iOS 17+)ITP 24h Cookie LimitSERVER CAPI (GTM)Direct Graph API (HTTPS)EVENT_ID DEDUPLICATIONMatch: 1:1 VerifiedMeta EMQ Score: 8.8 / 10Ecommerce Tracking
11 min read

Meta Pixel and CAPI Missing or Duplicate Events

Purchases doubled in Meta, or server events not arriving at all? Here is how Meta deduplicates Pixel and Conversions API events, where to check it in Events Manager, and how to fix each symptom.

Read guide
CLIENT BROWSERFirst-Party Origingtm.domain.com✓ Cookie RestoredCLOUD SERVER (GTM)Edge Proxy ClusterHttpOnly Cookie ShieldBypass Blockers: 100%GA4 MeasurementMeta CAPI ServerGoogle Ads APIServer-Side Tracking
7 min read

Server-Side Tracking Guide

A pragmatic breakdown of server-side GTM vs client-side tracking. Understand real infrastructure costs, privacy benefits, cookie longevity, and an objective ROI decision framework.

Read guide
TRIGGERForm Submitevent: generate_leadDATALAYER VAR{{dlv.conv_value}}type: currency_usdSTATUS: FIREDGoogle Ads TagConversion ID: 829-10Validated: 100% MatchGTM Tutorials
7 min read

Debug GTM Conversion Tracking

A systematic debugging guide using GTM Preview mode, dataLayer inspection, browser console, and GA4 DebugView to pinpoint and fix broken conversion tags.

Read guide