There are three ways to install the ChatGPT Ads Measurement Pixel via Google Tag Manager. The fastest is the AI-Advisors ChatGPT Ads integration: paste your OpenAI Pixel ID, pick your GTM container, and publish in GTM. Two minutes, no developer required, available on Growth+ plans. For a free no-code route, add the open-source OpenAI Ads Pixel community template from the GTM gallery and configure it with your Pixel ID. Or paste OpenAI's official init snippet into a Custom HTML tag yourself for full control. This guide walks all three.
- ChatGPT Ads integration (recommended): Paste Pixel ID → Select GTM container → Publish in GTM (~2 min, Growth+ plans)
- Community GTM template: Add the open-source OpenAI Ads Pixel template from the GTM gallery → configure Pixel ID → Publish (~5 min, free)
- Manual install: Custom HTML tag with OpenAI's official snippet → All Pages trigger → Publish workspace (~10 min)
- Pixel launched: May 5, 2026 (same day the Ads Manager opened to all US advertisers)
- Standard events supported: 10 (page_viewed, contents_viewed, items_added, checkout_started, order_created, lead_created, registration_completed, appointment_scheduled, subscription_created, trial_started) plus custom
- SDK function:
oaiq("measure", eventName, eventProps, eventOptions)
OpenAI shipped the ChatGPT Ads Measurement Pixel on May 5, 2026, the same day the Ads Manager opened to every US advertiser with no minimum spend. The pixel is a browser SDK that fires a global oaiq() queue, captures the oppref identifier from ChatGPT ad clicks, and reports 10 standard conversion events (plus custom events) back to your OpenAI Ads account.
You have three install options. The faster path is the AI-Advisors ChatGPT Ads integration: paste your OpenAI Pixel ID, pick your GTM container, and click through to publish. Two minutes inside AI-Advisors plus one publish click in GTM, no developer required, available on Growth+ plans. The no-code middle ground is the open-source OpenAI Ads Pixel community template, listed in the GTM Community Template Gallery: add it to your workspace, enter your Pixel ID, and configure events through validated fields instead of raw HTML. The manual path is to paste OpenAI's official init snippet into a Custom HTML tag in your GTM container yourself, wire the All Pages trigger, and publish the workspace. About 10 minutes if you have your Pixel ID ready, no third-party dependencies, useful when you want full control over the install.
This guide walks all three paths. Pick whichever fits your team. Then we wire all 10 standard conversion events, verify with the GTM Preview debugger, troubleshoot the common failure modes, and optionally pair the pixel with the Conversions API for browser-and-server deduplication.
The pixel is one HTTP call and a queue. The hard part is getting it onto every page, gated by consent, and deduplicated with your server. GTM solves all three.
What the ChatGPT Ads Measurement Pixel does
The pixel loads OpenAI's minified SDK from bzrcdn.openai.com/sdk/oaiq.min.js, initializes a global oaiq() queue tied to your Pixel ID, and exposes a single function call signature for conversion events:
oaiq("measure", eventName, eventProps, eventOptions);On every page load, the SDK captures the oppref query parameter from the URL (OpenAI's privacy-preserving ad-click identifier), stores it in a first-party __oppref cookie so later page views in the same session can reuse it, adds the current page origin as source_url, timestamps each event, and batches closely grouped calls. None of this needs configuration.
For the strategic context (why this pixel matters, what the April 30 privacy policy unlocked, the full roadmap), see our deep-dive on ChatGPT Ads conversion tracking. This guide is the implementation companion.
Prerequisites
- OpenAI Ads account. Sign in at ads.openai.com. Self-serve is open to every US advertiser as of May 5, 2026 with no minimum spend.
- Pixel ID. Create one in the Conversions tab inside Ads Manager. Treat it as semi-public (it appears in your page source). Format example:
pixel_abc123. - GTM container active on your site. If you do not have GTM installed yet, that is a separate one-time install at tagmanager.google.com.
- Publish access in GTM. "Edit" access is not enough; you need "Publish" rights to push the tag live (either path).
One-click install: AI-Advisors ChatGPT Ads integration (2 minutes)
For marketers who do not want to manually wire a Custom HTML tag, the AI-Advisors ChatGPT Ads integration handles the GTM setup in three steps. The integration is included on Growth+ plans, takes about 2 minutes inside AI-Advisors plus one publish click in GTM, and uses OpenAI's official init snippet under the hood (the same snippet the manual path below uses).
STEP 1: Paste your OpenAI Pixel ID
~30 secProvision a Pixel ID in the Conversions tab of Ads Manager (same as the manual path). Open AI-Advisors, navigate to Integrations → ChatGPT Ads, and paste your Pixel ID into the form. Format example: pixel_abc123.
STEP 2: Select your GTM container
~60 secConnect your Google account to grant AI-Advisors access to your GTM container. Select the container where your site lives. AI-Advisors requests read-and-write scope on that container only; it does not touch any other Google service or other GTM containers in the same account.
STEP 3: Publish in GTM
~30 secAI-Advisors stages a Custom HTML tag named OpenAI Ads Pixel - Init plus an All Pages trigger inside your GTM workspace. The integration's status panel shows Awaiting publish in GTM. Open GTM, click Publish on the workspace version (one click), and the pixel goes live within minutes.
A Custom HTML tag firing OpenAI's official init snippet from bzrcdn.openai.com/sdk/oaiq.min.js, wired to the built-in All Pages trigger. Identical to what you would build by hand following the manual walkthrough below. The integration does not publish the workspace for you, so you keep full control over what goes live.
Skip the manual setup. Paste your Pixel ID, pick your GTM container, publish in GTM. Available on Growth+ plans, 2 minutes from start to staged tag.
Connect the ChatGPT Ads integration →No-code option: the OpenAI Ads Pixel community template
OpenAI shipped the Measurement Pixel on May 5, 2026 with an SDK but no Google Tag Manager template, so unlike the Meta or TikTok pixels, early adopters had to wire a Custom HTML tag by hand. The community closed that gap: there is now an open-source OpenAI Ads Pixel template (maintained by Stape, Apache-2.0) listed in the GTM Community Template Gallery. It wraps OpenAI's standard pixel events in validated GTM fields, so you get a structured, no-code install without writing or maintaining raw HTML.
STEP 1: Add the template from the GTM gallery
~1 minIn your GTM web workspace, open Templates, then under Tag Templates click Search Gallery. Search for OpenAI Ads Pixel and add it to your workspace.
STEP 2: Create a tag and enter your Pixel ID
~2 minClick Tags, then New, and pick the OpenAI Ads Pixel template as the tag type. Paste your Pixel ID (from the Ads Manager Conversions tab) into the template's Pixel ID field.
STEP 3: Choose your event and parameter mapping
~2 minSet the event name (the base tag defaults to page_viewed). The template can map event parameters automatically from a GA4-style ecommerce Data Layer, or you can set amount, currency, and contents by hand. The same 10 standard events documented below are available as template options.
STEP 4: Configure consent, then add a trigger and publish
~3 minThe template exposes a Consent section that integrates with GTM Consent Mode, so you can gate firing on consent without writing the check yourself. Add the All Pages trigger for the base pixel (or specific conversion triggers for events), then Save, preview, and Publish the workspace.
The community template is free and gallery-listed, and it fires the same OpenAI standard events as the other two paths. You still wire each conversion event, consent gating, and browser-and-server deduplication yourself. The AI-Advisors integration stages the tag for you and ties the pixel into citation and AEO reporting; the manual snippet below gives you full control with no third-party template. Pick the trade-off that fits your team.
Manual install via Custom HTML tag in GTM (10 minutes)
If you prefer no third-party template at all (full visibility into exactly what runs on your site), wire the Custom HTML tag yourself. The manual path takes five steps, and the snippet you paste matches OpenAI's published documentation byte for byte, so future SDK updates are a one-line snippet swap.
STEP 1: Get your Pixel ID from Ads Manager
~2 minSign in to ads.openai.com, open the Conversions tab, click Create pixel, name it (e.g. "Main site pixel"), and copy the returned ID. The format is opaque, roughly 32 characters.
STEP 2: Create a Custom HTML tag in GTM
~2 minOpen your GTM workspace. Click Tags, then New, then Tag Configuration. Pick Custom HTML. Name the tag explicitly: OpenAI Ads Pixel - Init. Naming matters; you will want to find this tag quickly when you debug later.
STEP 3: Paste OpenAI's official init snippet
~2 minPaste the snippet below into the HTML field. Replace <YOUR-PIXEL-ID> with the ID you copied in Step 1. Keep debug: true while testing; remove it before publishing to production.
<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>",
debug: true
});
</script>STEP 4: Set the All Pages trigger
~1 minUnder Triggering, pick the built-in All Pages trigger (page_view event). The pixel needs to load on every page so the SDK can capture oppref from the landing URL and store it in the first-party __oppref cookie for later events to reuse.
STEP 5: Save, submit, and publish the workspace
~3 minClick Save. Open GTM Preview to verify the tag fires on every page (more on verification below). When the debugger confirms the tag and a network request to bzrcdn.openai.com, click Submit, name the version (e.g. "OpenAI Ads Pixel install"), and Publish. The pixel is live within minutes.
Wire your conversion events
Either install path puts the pixel SDK on every page. Conversion events are separate Event tags you fire on the actions that matter (form submit, button click, purchase confirmation). OpenAI's Measurement Pixel supports 10 standard event names plus a custom event. Each maps to one of four data shapes: contents, customer_action, plan_enrollment, or custom.
| Event name | Data shape | Use for |
|---|---|---|
| page_viewed | contents | Page loads, important page views |
| contents_viewed | contents | Product, listing, or article views |
| items_added | contents | Cart adds, bundle selections |
| checkout_started | contents | Checkout begun |
| order_created | contents | Purchase completed |
| lead_created | customer_action | Lead form submitted, contact request |
| registration_completed | customer_action | Account or event registration finished |
| appointment_scheduled | customer_action | Meeting, demo, or consultation booked |
| subscription_created | plan_enrollment | Paid subscription started |
| trial_started | plan_enrollment | Free trial started |
| custom | custom | Anything not in the standard taxonomy |
Example: fire a lead_created event on form submit
Add a GTM Custom HTML or Event tag triggered by your lead form submit event:
oaiq("measure", "lead_created", {
type: "customer_action",
});Example: fire order_created with deduplication-ready event_id
On a purchase confirmation page, fire the event with a unique event_id so you can deduplicate against a server-fired Conversions API event with the same ID:
oaiq("measure", "order_created", {
type: "contents",
amount: 12999,
currency: "USD",
contents: [
{
id: "sku_123",
name: "Starter bundle",
content_type: "product",
quantity: 1
}
]
}, {
event_id: "order_12345"
});Example: fire a custom event
For events outside the standard taxonomy, keep eventName as custom, set type to custom in eventProps, and put the label in eventOptions.custom_event_name (not eventProps):
oaiq("measure", "custom", {
type: "custom",
amount: 12999,
currency: "USD"
}, {
custom_event_name: "quote_requested",
event_id: "quote_req_456"
});Putting custom_event_name or event_id inside eventProps instead of eventOptions. They go in the fourth argument (options), not the third (props). OpenAI's SDK silently drops them if they are in the wrong object.
Verify the install
Three verification layers, in order of speed:
1. GTM Preview mode
Click Preview in the top right of GTM. Open your site in the connected debug window. Navigate. The Tag Assistant panel should show your OpenAI Ads Pixel tag firing on every page. Check the Variables tab for the right Pixel ID. Check the Data Layer tab for the events you wired.
2. Browser console with debug: true
With debug: true in your init config, the SDK logs activity to the browser console. Open DevTools, refresh, and you should see SDK init messages and event payloads as they fire. Useful for confirming the Pixel ID is correct and that conversion events carry the right type, amount, currency, and any contents[] items.
3. Ads Manager events tab
Open Ads Manager, navigate to the Conversions tab, click your pixel, and look at the Events panel. Real events arrive within a few minutes of firing. If you do not see them, the issue is upstream of the network (the tag is not firing, the Pixel ID is wrong, or the event payload is malformed).
Troubleshooting
- Tag is not firing. In GTM Preview, check whether the trigger condition matches. The most common cause is the trigger pointing at a custom event that your DataLayer never pushes.
- Tag fires but no network request to bzrcdn.openai.com. The Init tag did not run before the Event tag, so
oaiqis undefined. Use GTM tag sequencing ("Fire a tag before this tag fires") to guarantee Init runs first. - Events arrive at OpenAI but are not deduplicating with server events. Confirm the
event_idon the pixel call matches theidon the Conversions API call. For custom events, also confirmcustom_event_namematches on both sides. - Pixel ID typo. A wrong Pixel ID will not error; events go to the void. Double-check against Ads Manager.
- Custom event name validation failed. Use lowercase letters, numbers, underscores, or dashes. 1 to 64 characters. Do not reuse a standard event name.
- Consent declined and pixel still fires. Wrap the init call in a consent check or use a consent-update trigger so the pixel does not fire until the user has opted in.
Pair the pixel with the Conversions API for browser-and-server dedup
The pixel alone loses conversions to ad blockers, browser tracking prevention (ITP, ETP), consent declines, and broken page rendering. The OpenAI Conversions API is the server-side companion that recovers those.
The dedup primitive is a shared event_id: when your server fires a conversion event, generate a unique ID and pass it to both the pixel (as event_id in eventOptions) and the Conversions API (as id in the event payload). OpenAI matches on the tuple of Pixel ID + event name + event_id and collapses duplicates into a single conversion.
Our deep-dive on ChatGPT Ads conversion tracking walks the full client-and-server stack, the strategic case for running both, and the April 30 OpenAI privacy policy that unlocked the pixel for general availability. For the programmatic-management side (campaign CRUD via the Advertiser API, reporting via the Insights API), see our companion post on how to get an OpenAI Ads API key. For the retargeting side (uploading hashed CRM lists as include or exclude audience filters), see ChatGPT Ads custom audiences. The pixel is the upstream measurement half; custom audiences are the downstream targeting half.
The pixel and the Conversions API are not redundancy. They are a quorum.
Skip the manual GTM setup entirely. Paste your OpenAI Pixel ID, pick your GTM container, publish in GTM. Available on Growth+ plans, 2 minutes from start to staged tag plus one publish click.
Connect the ChatGPT Ads integration →Frequently Asked Questions
#What does the AI-Advisors ChatGPT Ads integration do, and does it publish to GTM for me?
The integration automates the Custom HTML tag and All Pages trigger setup inside your GTM container. You paste your OpenAI Pixel ID, select your GTM container via Google OAuth (scope limited to the chosen container, no access to any other Google service), and AI-Advisors stages the tag for you. You then publish the workspace version yourself in GTM with one click. The integration does not publish to GTM on your behalf, so you keep full control over what goes live. Setup is about 2 minutes inside AI-Advisors plus one publish click in GTM. Available on Growth+ plans.
#When did OpenAI release the ChatGPT Ads Measurement Pixel?
OpenAI launched the JavaScript Measurement Pixel on May 5, 2026, the same day the Ads Manager opened to every US advertiser with no minimum spend. The server-side Conversions API for event ingestion shipped on the same date. OpenAI's documentation describes the pixel as a JavaScript SDK installable via a Custom HTML tag, which is the snippet both the AI-Advisors integration and the manual path use.
#Is there a Google Tag Manager template for the ChatGPT Ads pixel?
Yes. OpenAI shipped the Measurement Pixel without an official GTM template, but an open-source community template (the OpenAI Ads Pixel template, listed in the GTM Community Template Gallery and maintained by Stape) now fills that gap. It wraps OpenAI's standard pixel events in configurable GTM fields, so you can install without writing Custom HTML. In total there are three routes: the AI-Advisors integration (managed, stages the tag for you), the community template (free and no-code, but you configure events and consent yourself), and a manual Custom HTML tag (full control, no dependencies).
#Can I track ChatGPT Ads conversions without Google Tag Manager?
Yes. The simplest install is pasting OpenAI's init snippet directly into the head of every page that should fire the pixel. GTM is recommended because it centralizes tag management, supports versioning, gates by consent, and lets non-developers update conversion logic without touching the codebase. But it is not required. The pixel snippet is plain JavaScript that works wherever a script tag works.
#Do I need server-side GTM for the pixel to work?
No. Client-side GTM is sufficient for the JavaScript pixel. Server-side GTM is an optional companion that lets you also send the same events from your backend via the OpenAI Conversions API. Server-side helps recover conversions lost to ad blockers, browser tracking prevention, and consent declines. The pixel and the Conversions API share an event_id so OpenAI can deduplicate browser and server events as a single conversion.
#Where should I place the pixel snippet in my GTM container?
Use a Custom HTML tag wired to the built-in All Pages trigger so the SDK loads on every page. The pixel needs early access to the page so it can capture the oppref query parameter from ChatGPT ad clicks before the user navigates away. If you have other tags that fire conversion events (lead form submit, order confirmation, custom DataLayer pushes), use GTM's built-in "Fire a tag before this tag fires" tag-sequencing to guarantee the pixel Init runs before any Event tag references the oaiq global.
#Does the pixel work with Google Consent Mode v2?
Yes, but you need to wire consent gating yourself when using the manual Custom HTML approach. Wrap the oaiq init call in a consent check, or set the Custom HTML tag to wait for a consent-update event before firing. For GDPR or CPRA-regulated traffic, set up consent gating before publishing the tag to production. Until consent is granted, the pixel should not fire.
#How do I deduplicate browser-fired and server-fired conversion events?
Generate a unique event_id on your server when the conversion happens, pass it to the browser pixel via oaiq("measure", eventName, eventProps, { event_id }), and send the same event_id with the Conversions API call from your server. OpenAI matches on the tuple of pixel ID, event name, and event_id (plus custom_event_name for custom events) and collapses duplicates into a single conversion at ingest. The full deduplication pattern lives in our deeper post on ChatGPT Ads conversion tracking.
Related Reading
- How to Add UTM Codes to ChatGPT Ads
- ChatGPT Ads Conversion Tracking Is Real: What OpenAI's April 30 Privacy Policy Update Tells You About the Roadmap
- How to Report on ChatGPT Ad Campaigns: A 2026 Measurement Stack
- How to Set Up a ChatGPT Ad Campaign in 8 Steps (June 2026)
- How to Use ChatGPT Ads: A Marketer's Step-by-Step Guide (2026)
- How to Measure ROI for ChatGPT Ads: The 4-Layer ROAS Stack
