Back to Resources

ChatGPT Ads Conversion Tracking: Pixel Setup, Conversions API, and Attribution Guide (2026)

Technical implementation guide for OpenAI's JavaScript pixel and Conversions API. Covers pixel installation, server-side event tracking, UTM strategy, attribution models, and how to solve the conversation gap where 60% of conversions happen outside the click window.

Sofia18 min read

Why ChatGPT ads measurement is different

Every ad platform has an attribution gap at launch. Google’s took two years to close. Meta’s pixel went through a decade of iterations before reaching maturity. But ChatGPT ads introduce a structural measurement challenge that neither Google nor Meta ever faced: the conversation gap. Users engage with your ad inside a multi-turn dialogue, absorb product information, compare alternatives, and form purchase intent – all without clicking through to your site. When they finally convert, they arrive via branded search or a direct URL, and your attribution model gives ChatGPT zero credit.

Early advertiser data puts the scale of this gap at roughly 60%. Only about 40% of conversions attributable to ChatGPT ads happen in the immediate post-click session. The remaining 60% occur hours, days, or even weeks later, through channels that have no traceable link back to the original ChatGPT interaction. If you rely solely on native Ads Manager reporting, you are seeing less than half the picture.

~60%

Estimated share of ChatGPT-influenced conversions that occur outside the immediate click window

Source: Early advertiser cohort analysis, Q1–Q2 2026

Traditional Google and Meta attribution models fail here for a specific reason: they assume a linear click-to-conversion path. Google’s model tracks a keyword search, an ad click, a landing page visit, and a conversion event – each step connected by a browser session. Meta’s pixel fires on page load and matches events to a user who clicked or viewed an ad within a defined window. Both depend on a direct, traceable connection between ad exposure and site visit. ChatGPT breaks that connection because the ad exposure happens inside a conversational interface, not inside a browser that carries cookies and click IDs to your domain.

The solution is a 4-layer measurement stack that captures what the pixel sees, what the API confirms, what your analytics platform tracks, and what users self-report. Layer 1: the JavaScript pixel fires browser-side events for users who click through and convert in the same session. Layer 2: the Conversions API sends server-side event data for offline conversions, CRM events, and situations where the pixel cannot fire. Layer 3: UTM-tagged analytics in GA4 connects ChatGPT traffic to on-site behavior and funnel progression. Layer 4: post-conversion surveys capture the dark funnel – users who were influenced by a ChatGPT ad but converted through an untracked path.

Together, these four layers close the measurement gap from roughly 40% visibility to 85–95%. The rest of this guide walks through each layer with implementation details.

JavaScript pixel setup

OpenAI’s JavaScript pixel works similarly to the Meta pixel or Google’s gtag: you install a base snippet in your site’s <head>, then fire named events when users take conversion actions. The pixel handles first-party cookie management, session stitching, and event batching automatically.

Step 1: Create a Pixel ID

In the OpenAI Ads Manager, navigate to Events Manager > Pixels and click Create Pixel. You will receive a Pixel ID in the format oai-px-XXXXXXXXXX. Copy this ID – you will need it for the base snippet.

Step 2: Install the base snippet

Add the following code inside the <head> tag of every page on your site. The snippet must load before the closing </head> tag to ensure it fires before any user interaction.

<!-- OpenAI Ads Pixel -->
<script>
  !function(o,a,i,q){o.oaiq=o.oaiq||function(){
  (o.oaiq.q=o.oaiq.q||[]).push(arguments)};
  var s=a.createElement("script");
  s.async=1;s.src="https://ads.openai.com/pixel.js";
  a.head.appendChild(s)}(window,document);
  oaiq("init", "YOUR-PIXEL-ID");
  oaiq("measure", "page_viewed");
</script>

Replace YOUR-PIXEL-ID with the Pixel ID from Step 1. The init call registers your pixel, and the page_viewed event fires automatically on every page load, giving you baseline traffic data.

Step 3: Fire conversion events

To track specific actions, call oaiq(“measure”, eventName, eventProps) when the action occurs. OpenAI supports these standard event types:

Event NameWhen to Fire
page_viewedEvery page load (included in base snippet)
registration_completedAccount creation or signup form submission
lead_createdLead form submission, demo request, contact form
order_createdCompleted purchase or transaction
subscription_createdPaid subscription activated
trial_startedFree trial initiated
appointment_scheduledBooking or appointment confirmation
checkout_startedUser begins checkout flow
contents_viewedProduct page or content detail view
items_addedProduct added to cart or wishlist

Event properties vary by type. For order_created, pass value (revenue in USD), currency, and order_id. For lead_created, pass lead_type and any qualifying data. Example:

oaiq("measure", "order_created", {
  value: 149.00,
  currency: "USD",
  order_id: "ORD-20260510-7842"
});

Platform-specific notes

Shopify: Add the base snippet via Online Store > Themes > Edit Code > theme.liquid inside the <head> tag. For purchase tracking, add the order_created event call to the Additional scripts field in Settings > Checkout, using Shopify’s Liquid variables for order value and ID.

WordPress: Use a header injection plugin like Insert Headers and Footers to add the base snippet. Fire events by adding inline <script> blocks to confirmation pages or by hooking into your form plugin’s success callbacks (e.g., Gravity Forms’ gform_confirmation_loaded event).

Next.js: Add the base snippet to your custom _document.tsx or use the next/script component with strategy=“afterInteractive”. Fire events from React components using window.oaiq after confirming it exists. For App Router, place the script in your root layout.tsx.

Conversions API setup

The Conversions API (CAPI) lets you send event data server-side, bypassing browser limitations like ad blockers, cookie restrictions, and JavaScript errors. Use it for offline conversions (CRM deal stages, phone orders, in-store purchases), server-side events that the pixel cannot capture, and as a redundancy layer alongside the pixel for higher data reliability.

Authentication

Generate an API token in Ads Manager > Events Manager > API Access. The token authenticates all CAPI requests. Store it as an environment variable on your server – never expose it in client-side code.

Endpoint and request format

Send a POST request to:

POST https://bzr.openai.com/v1/events?pid=YOUR-PIXEL-ID
Authorization: Bearer YOUR-API-TOKEN
Content-Type: application/json

Event structure

Each event in the request body requires these fields:

FieldTypeDescription
idstringUnique event ID for deduplication
typestringStandard event name (e.g., order_created)
timestamp_msnumberUnix timestamp in milliseconds when the event occurred
dataobjectEvent-specific properties (value, currency, order_id, etc.)
action_sourcestringWhere the event occurred: website, app, phone_call, chat, physical_store, other
source_urlstringURL where the event occurred (required for website action source)

Batching

You can batch up to 1,000 events per API call. Send events as a JSON array in the request body. Batching reduces the number of HTTP requests and is the recommended approach for high-volume senders. Process your event queue every 5–15 minutes rather than sending individual events in real time.

Timestamp rules

The timestamp_ms field must reflect when the event actually occurred, not when you sent the API request. OpenAI accepts events with timestamps up to 7 days in the past. Events older than 7 days are rejected. For offline conversions like phone orders or CRM stage changes, send them as soon as they happen – do not batch offline events for longer than 24 hours.

Deduplication

The id field is the deduplication key. If OpenAI receives two events with the same id, the second is discarded. Use a deterministic ID format that combines the event type, user identifier, and timestamp: for example, order_created_user123_1715356800000. This ensures that if your server retries a failed request, or if the same event fires from both the pixel and the API, only one instance is counted.

Pixel and API together

Running both the JavaScript pixel and the Conversions API simultaneously gives you the highest data coverage. The pixel captures browser-side events instantly with minimal development effort. The API captures events the pixel misses – ad-blocked sessions, server-side events, offline conversions, and cross-device actions. Together, they cover more of the conversion landscape than either one alone.

15–25%

Typical increase in tracked conversions when adding the Conversions API alongside the pixel

Source: Meta CAPI benchmarks applied to OpenAI’s parallel architecture, 2026

The critical requirement when running both is deduplication. Without it, every event that fires from both the pixel and the API gets counted twice, inflating your conversion numbers and destroying the accuracy of your reporting. Use the same id value for the same event across both channels. When the pixel fires order_created with id: “ord-7842” and your server sends the same event via CAPI with id: “ord-7842”, OpenAI keeps one and discards the duplicate.

The simplest deduplication strategy is to generate the event ID on the server and pass it to the front end. When a purchase completes, your server creates the ID, renders it into the confirmation page, and the pixel fires with that ID. Simultaneously, your server sends the same event via CAPI with the same ID. This guarantees both channels reference the same event, regardless of which one OpenAI processes first.

Decision tree: which method to use

Event TypeRecommended MethodWhy
Page viewPixel onlyHigh volume, low value – API overhead not justified
Content viewPixel onlyMid-funnel engagement, browser-side is sufficient
Add to cartPixel + APIIntent signal worth protecting against ad blockers
Checkout startedPixel + APIHigh-intent event, needs redundancy
Purchase / orderPixel + APIRevenue event – maximum reliability required
Lead / demo requestPixel + APIPrimary conversion, server confirmation adds accuracy
Subscription activationAPI onlyOften processed server-side with payment webhooks
Offline purchaseAPI onlyNo browser session exists
CRM stage changeAPI onlyBackend event with no browser context
Phone call conversionAPI onlyOffline event tracked via call platform

UTM parameter strategy

The pixel and API tell OpenAI what happened. UTMs tell your analytics platform where the traffic came from. Without consistent UTM tagging, ChatGPT ad traffic shows up in GA4 as “Unassigned” or gets lumped into “Direct,” and you lose the ability to analyze on-site behavior by source.

Use this structure for every ChatGPT ad destination URL:

?utm_source=chatgpt
&utm_medium=cpc        // use cpm for CPM campaigns
&utm_campaign={campaign-name}
&utm_content={creative-id}
&utm_term={target-topic}
  • utm_source=chatgpt – identifies the traffic source; keep this identical across all ads
  • utm_medium=cpc – for cost-per-click campaigns; use cpm for impression-based buys
  • utm_campaign – maps to your campaign name or topic cluster (e.g., crm-for-startups)
  • utm_content – identifies the specific creative variant (e.g., headline-v2-long-desc)
  • utm_term – the target conversation topic or keyword cluster (e.g., project-management-tools)

GA4 custom channel grouping

GA4 does not recognize “chatgpt” as a known traffic source by default. Without a custom channel group, your UTM-tagged traffic lands in the “Unassigned” bucket. Navigate to GA4 Admin > Data display > Channel groups and create a custom channel with rules: source exactly matches chatgpt AND medium matches regex cpc|cpm. Name it “ChatGPT Ads.” This ensures ChatGPT appears as its own row in every channel-level report.

Once the custom channel is active, build a GA4 Exploration report filtered to source = chatgpt. Include dimensions for campaign, content, landing page, and device category. Include metrics for sessions, engaged sessions, engagement rate, key events, and key event rate. This becomes your operational view for ChatGPT campaign performance beyond what Ads Manager provides.

Lapis auto-generates UTM-tagged destination URLs for every ChatGPT ad creative you build. This eliminates manual URL construction and prevents the tagging inconsistencies (like using “ChatGPT” vs. “chatgpt” vs. “chat-gpt”) that fragment your analytics data. When you export creatives from Lapis, the UTMs are already attached.

Solving the attribution problem

The pixel and API track conversions that happen in a direct click-to-conversion path. But the conversation gap means roughly 60% of ChatGPT-influenced conversions happen outside that path. Users see your ad, absorb the information, and convert later through branded search, a direct visit, or a different device. Last-click attribution gives ChatGPT zero credit for those conversions.

Last-click fails because it was designed for a linear click path. ChatGPT’s influence is more like a podcast ad or a billboard: it creates awareness and consideration at a critical decision moment, but the conversion happens elsewhere. You need attribution models that account for this.

Model 1: First-touch with decay

Assign primary credit (60–70%) to the first touchpoint in the conversion journey and distribute the remaining credit across subsequent touchpoints with a time-decay curve. If a user’s first interaction was a ChatGPT ad click, that touchpoint receives majority credit even if the final conversion happened through Google branded search five days later. This model explicitly values the discovery role that ChatGPT ads play.

Implementation: tag all ChatGPT ad clicks with a first-party cookie that persists for 30 days. When the user converts, check whether the cookie exists. If it does, attribute first-touch credit to ChatGPT regardless of the session source at conversion time.

Model 2: Time-decay

Distribute credit across all touchpoints with a half-life decay. A 7-day half-life means a touchpoint 7 days before conversion gets half the credit of a touchpoint on conversion day. This model works well for sales cycles of 7–30 days. For ChatGPT ads, it captures the initial influence while still crediting the closing touchpoint.

GA4’s data-driven attribution model uses a similar approach. Set your GA4 attribution settings to data-driven (the default since 2023) and extend the lookback window to 30 days for acquisition and 90 days for all other conversions. This gives ChatGPT ads a longer window to receive credit.

Model 3: Incrementality testing

The gold standard. Rather than modeling credit after the fact, incrementality testing measures whether ChatGPT ads caused conversions that would not have happened otherwise. Run a geo-holdout test: select two comparable markets, run ChatGPT ads in one, withhold them in the other, and compare conversion rates after 4–6 weeks. The difference is the true incremental lift. Alternatively, run on/off tests by pausing ChatGPT ads for two weeks and monitoring the impact on branded search volume and direct traffic.

GA4 funnel for ChatGPT attribution

Build a Funnel Exploration in GA4 with these steps, filtered to source = chatgpt:

  1. Ad click – user arrives on your site via ChatGPT ad (tracked by UTM)
  2. Engagement – user scrolls past 50%, clicks a CTA, or views a second page
  3. Micro-conversion – user starts a form, adds to cart, or begins checkout
  4. Macro-conversion – user completes the primary goal (purchase, signup, demo request)

The funnel visualization shows exactly where ChatGPT traffic drops off and reveals whether the conversion bottleneck is engagement (creative-landing page mismatch), micro-conversion (UX or offer issue), or macro-conversion (pricing or trust issue).

Cross-device challenges

A user sees your ChatGPT ad on mobile, researches on desktop, and converts on a tablet. Without identity resolution, GA4 sees three separate anonymous users. Enable Google Signals in GA4 (Admin > Data Collection) to unlock cross-device reporting for users signed into Google accounts. For non-Google users, implement a user ID system that passes a consistent identifier across devices when users log in or create accounts.

Post-conversion survey template

Add a single question to your post-purchase or post-signup flow: “How did you first hear about us?” Include these options:

  • Google Search
  • ChatGPT / AI assistant
  • Social media (Instagram, TikTok, LinkedIn)
  • Friend or colleague
  • Podcast or YouTube
  • Blog or article
  • Other

Survey data is less precise than pixel tracking, but it captures the dark funnel: users who were influenced by ChatGPT but converted through an untracked path. Even a 30% response rate provides directional signal that quantifies ChatGPT’s brand-building impact beyond direct clicks.

Building your reporting stack

A complete ChatGPT ads measurement system has four layers, each capturing data the others miss. When all four are connected, you move from 40% visibility (Ads Manager alone) to 85–95% confidence in your ROI numbers.

Layer 1: Ads Manager. Impressions, clicks, CTR, and now pixel/API conversion events. This is your top-of-funnel view. It tells you which campaigns are getting traction and which conversions fired within the click window. Limitations: no cross-channel comparison, no funnel analysis, and no attribution beyond the click window.

Layer 2: GA4 + UTMs. On-site behavior segmented by ChatGPT traffic. Engagement rate, funnel progression, landing page performance, and conversion events. GA4 fills the gap between the click and the conversion with behavioral data that Ads Manager cannot provide. Build your custom ChatGPT Ads channel group and Exploration reports as described in the UTM section.

Layer 3: CRM. For B2B and high-consideration purchases, the CRM tracks what happens after the website conversion. Tag leads at the point of capture with UTM source data. Follow ChatGPT-sourced leads through MQL, SQL, Opportunity, and Closed-Won stages. Calculate pipeline influence: total dollar value of deals where the first touch was a ChatGPT ad.

Layer 4: Surveys. Post-purchase surveys capture the dark funnel – users who were influenced by ChatGPT but converted through branded search, direct, or another channel. Add “ChatGPT / AI assistant” as an explicit option. Even partial response rates provide the directional signal needed to close the attribution gap.

Cross-channel comparison

MetricChatGPT AdsGoogle AdsMeta Ads
Avg. CPC$10–$15$2–$6$1–$3
Landing page CVR4–6%2.5–4%1.5–3%
MQL-to-SQL rate35–45%20–30%15–25%
Pixel coverage~75%~85%~80%
CAPI coverage boost+15–25%+10–15%+15–20%
Dark funnel share~60%~20%~30%

ChatGPT’s higher CPC is offset by higher conversion rates and lead quality. The key difference is the dark funnel share: 60% of ChatGPT-influenced conversions are invisible to standard tracking, compared to 20–30% for Google and Meta. This makes the survey layer far more critical for ChatGPT than for other channels.

For a step-by-step guide to building a unified Looker Studio dashboard that combines all four layers, see our ChatGPT ads reporting dashboard guide.

Common tracking mistakes

These six mistakes account for the majority of tracking failures in ChatGPT ad campaigns. Each one is preventable with the right setup.

1. Pixel installed in body instead of head

The OpenAI pixel must load in the <head> tag, not the <body>. When placed in the body, the pixel initializes after DOM content loads, which means it misses early page-view events and can fail to register the session entirely if the user navigates away quickly. This is the most common installation error and the easiest to fix. Check your page source: if the pixel snippet appears after <body>, move it above </head>.

2. Not deduplicating pixel and API events

Running both the pixel and CAPI without shared event IDs doubles your reported conversions. Your ROAS looks inflated, your cost-per-acquisition looks artificially low, and every optimization decision you make based on that data is wrong. Generate a deterministic event ID on the server, pass it to the front end for the pixel call, and include the same ID in the CAPI request. Test deduplication by checking your Events Manager for duplicate events after a known conversion.

3. Using the same UTM parameters as Google Ads

If your Google Ads use utm_source=google&utm_medium=cpc and your ChatGPT ads also use utm_medium=cpc but with utm_source=chatgpt, the separation is clean. The mistake happens when teams use generic values like utm_source=paid or utm_medium=ad across platforms, making it impossible to isolate ChatGPT traffic in GA4. Always use utm_source=chatgpt as a distinct, consistent identifier.

4. No GA4 custom channel group

Without a custom channel group, GA4 dumps ChatGPT traffic into “Unassigned” or “Other.” It is still technically trackable via source filters, but it does not appear in default channel reports, which means anyone looking at the standard GA4 interface will not see ChatGPT as a channel. The fix takes two minutes: Admin > Channel Groups > Create Custom Channel > set source = chatgpt.

5. Ignoring the 7–14 day conversion window

ChatGPT’s conversational format creates longer consideration cycles than search ads. Users who click a ChatGPT ad may take 7–14 days to convert. If you evaluate campaign performance based on same-day or same-session conversions, you systematically undercount results. Wait at least 14 days after a campaign starts before making optimization decisions based on conversion data. Extend your GA4 lookback window to 30 days for acquisition events.

6. Not using post-conversion surveys

Surveys are the only way to capture the ~60% of conversions that happen outside the tracked click path. Without a survey, you are making budget decisions based on less than half the data. Adding a single “How did you hear about us?” question with “ChatGPT” as an option takes minimal development effort and immediately provides signal about ChatGPT’s full influence. Every advertiser running ChatGPT ads should have this in place from day one.

Frequently Asked Questions

How do I install the OpenAI ads pixel on my website?
Add the JavaScript pixel snippet inside the <head> tag of every page on your site. The snippet initializes with your Pixel ID from Ads Manager and automatically fires a page_viewed event. Then add oaiq("measure", eventName, eventProps) calls on pages where conversion actions occur, such as purchase confirmations or signup completions.
What is the difference between the pixel and the Conversions API?
The pixel runs in the browser and captures events from users who have JavaScript enabled and no ad blocker. The Conversions API sends events server-side, covering ad-blocked sessions, offline conversions (phone orders, CRM events), and server-processed transactions. Use both together with shared event IDs for maximum coverage.
How do I deduplicate events between the pixel and Conversions API?
Use the same event ID for the same conversion across both channels. Generate a deterministic ID on your server (e.g., combining event type, user ID, and timestamp), pass it to the front end for the pixel call, and include it in the CAPI request. OpenAI discards the second event with a matching ID automatically.
What standard events does the OpenAI pixel support?
The pixel supports page_viewed, registration_completed, lead_created, order_created, subscription_created, trial_started, appointment_scheduled, checkout_started, contents_viewed, and items_added. Each event accepts type-specific properties like value, currency, and order_id.
Why does last-click attribution undervalue ChatGPT ads?
Roughly 60% of ChatGPT-influenced conversions happen outside the immediate click session. Users absorb information during a conversation, then convert days later through branded search or a direct visit. Last-click gives credit to the final touchpoint (Google or direct) and assigns zero credit to the ChatGPT ad that created the awareness.
What UTM parameters should I use for ChatGPT ads?
Use utm_source=chatgpt, utm_medium=cpc (or cpm for impression campaigns), utm_campaign for your campaign name, utm_content for the creative variant ID, and utm_term for the target topic. Create a custom channel group in GA4 matching source=chatgpt so it appears as its own channel in reports.
How many events can I batch in a single Conversions API call?
You can batch up to 1,000 events per API request. Send events as a JSON array to the endpoint at https://bzr.openai.com/v1/events. Event timestamps must be within 7 days of the current time. Process your event queue every 5-15 minutes rather than sending individual real-time requests.
How do I measure ChatGPT ad conversions that happen offline or on a different device?
Use the Conversions API with action_source set to phone_call, physical_store, or app for offline events. For cross-device tracking, enable Google Signals in GA4 and implement a user ID system that passes a consistent identifier when users log in. Add a post-conversion survey asking how users first heard about you, with ChatGPT as an explicit option.

Try Lapis free

Create designer quality, on-brand ads using AI.

Start free trial