Most. Help

ChatGPT Ads Server-Side GTM: Sending Conversions API Events From a Server Container

Published Sep 13, 20265 min readIntermediate
Hand-drawn server box connected by a dotted pipe to a chat window, conversions flowing as letter cards, one marked orange, meaning ChatGPT Ads server-side GTM
What you'll learn
  • What server-side GTM changes for ChatGPT Ads measurement
  • How a custom template delivers events with sendHttpRequest
  • Which payload fields the OpenAI endpoint expects
  • How consent, dedup, and validation fit the server flow
Intermediate

ChatGPT Ads Server-Side GTM: Sending Conversions API Events From a Server Container

What Server-Side GTM Changes for ChatGPT Ads Measurement

Server-side GTM (sGTM) is Google's server container: page events arrive at your tagging endpoint, and server-side tags process and forward them wherever they need to go. Pointed at ChatGPT Ads, the container becomes a delivery layer for the Conversions API - your server sends the conversion instead of relying on the browser pixel alone. The measurement logic stays identical to the direct integration: the same event_id deduplication, the same supported events, the same attribution conditions. What changes is operational control - outgoing requests leave from your infrastructure, payload shaping is code you own, and the browser dependency shrinks to whatever the pixel still needs to catch.

The Delivery Path: A Custom Template on sendHttpRequest

The server container ships measurement templates for Google's own products; there is no built-in ChatGPT Ads tag, and the official way to make arbitrary outbound HTTP requests from server-side templates is Google's sendHttpRequest API - part of the documented custom template API set at developers.google.com. A minimal ChatGPT Ads template wraps three things: the endpoint, the credentials, and the payload. OpenAI's Conversions API documentation defines the call as a POST to https://bzr.openai.com/v1/events?pid=<PIXEL-ID> with a bearer header:

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

The Pixel ID and Conversions API key come from the conversions tab in Ads Manager - the same pair a direct integration uses - and the template treats them as configuration fields rather than hardcoded strings. Custom templates declare their permissions explicitly, so the template config must allow the outbound request domain; that declaration is what keeps a stray template from calling random hosts.

What the Payload Carries

The body follows the OpenAI event schema: the standard event name, its matching data shape, and the optional amount-currency pair in minor units. Server-side delivery unlocks the two events the browser cannot send at all - app_installed and app_opened travel only through the Conversions API with action_source set to mobile_app. Two fields deserve deliberate handling in the template. The oppref click reference, captured by the pixel into a first-party cookie, should be included in CAPI calls when available - server-side code reads it from the incoming event or cookie jar and passes it through. And the event_id must match the pixel's value for the same conversion, because deduplication between browser and server copies runs on that shared key. For matching when the click reference is missing, the payload's optional user object accepts hashed emails (emails_sha256) plus ip_address and user_agent - fields a server container can forward from its own request context.

Server delivery complements the pixel rather than replacing it, so the browser-side requirements still apply. The pixel supports a consent feature - oaiq("consent", false) before init, flipped to true when the user grants measurement consent - and blocked events are not replayed later. Sites enforcing a Content Security Policy merge OpenAI's documented sources into their policy: the SDK loads from bzrcdn.openai.com, while events and configuration reach bzr.openai.com. The sGTM side adds its own rule: outgoing requests respect the container's setup, and the server's job is to carry consent signals into payload decisions rather than to bypass them.

Validating the Server Delivery

Validation follows the same test-before-spend habit as every other integration. Trigger one conversion that flows browser-to-container-to-OpenAI, then confirm in Ads Manager that the event arrived attributed to the click, that the event_id deduplicated the pixel and server copies into a single counted conversion, and that nothing doubled. sGTM's preview mode shows the incoming request and the outgoing sendHttpRequest call side by side, which makes payload mistakes visible before they reach production traffic. MOST skips the template work entirely by delivering tracked conversions server-side to ChatGPT Ads alongside Meta, TikTok, Reddit, Snapchat, and Pinterest, and the free Pixel Activator validates a single landing at pixel.way2.us for teams that need one event working first.

Frequently asked questions

Sources

Sources

Was this guide helpful?
Author
Most Team
Справочная служба

Официальные руководства и глоссарий для платформы Most и Активатора пикселей.

Topic
ChatGPT Ads Complete Guide: Campaigns, Tracking, and Measurement
Main article of the topic
Related articles

Related guides