How ChatGPT Serves Ads — The Full Attribution Loop, Reverse-Engineered
A technical deep-dive reverse-engineered ChatGPT's advertising system, revealing a four-token attribution chain injected into conversation streams, contextual ad targeting based on chat topics, and an OAIQ SDK that loads on merchant sites to report user events back to OpenAI's infrastructure — creating a closed-loop attribution system analogous to Google Ads.
Original sourceA researcher published a detailed technical analysis today of how OpenAI's advertising platform works inside ChatGPT, based on traffic analysis from a consented research fleet. The findings reveal a sophisticated closed-loop attribution system that goes well beyond simple banner ads.
**How the ads are delivered:** Ad objects are injected directly into the conversation stream as the model responds — structured units containing advertiser creative assets, details, and four encrypted tokens for tracking. Contextual targeting selects ads based on the live conversation topic; in observed sessions, a Beijing travel conversation triggered Grubhub ads, while an NBA discussion served Gametime. The system appears to infer purchase intent from context in real time.
**The four-token attribution chain:** Each ad contains (1) a server-side integrity check token, (2) a "forward attribution" token with a 30-day cookie lifespan, (3) an outbound reference token for OpenAI's logging infrastructure, and (4) a nested encrypted reconciliation token. When a user clicks through to a merchant site, the OAIQ SDK — loaded on the merchant's pages — reads the attribution token from URL parameters, stores it, and reports subsequent user purchase events back to OpenAI. This creates the same closed-loop conversion attribution that made Google Ads dominant.
**Why this matters:** OpenAI is building the same data infrastructure that powers the $200B/year search advertising industry, except the targeting signal is richer than any keyword — it's an ongoing conversation revealing intent, knowledge level, preferences, and decision-making context. The implications for user privacy are significant. The implications for OpenAI's revenue model are even larger. If ChatGPT can attribute downstream purchases at the same accuracy as Google, advertisers will pay substantially more per impression.
The researcher noted OpenAI has not publicly disclosed the full extent of this tracking infrastructure in its advertising documentation.
Panel Takes
The Builder
Developer Perspective
“The OAIQ SDK loading on merchant sites is the part that should get more attention. OpenAI is now embedded in the conversion funnel of e-commerce sites, not just running ads inside its own product. This is Google Analytics territory in terms of third-party reach.”
The Skeptic
Reality Check
“Contextual targeting based on live conversation content is a materially different privacy proposition than keyword-based search ads. You're not just telling OpenAI what you want to buy — you're telling it why, and what you think about it. Users agreed to chat, not to be profiled for ad networks.”
The Futurist
Big Picture
“Conversational advertising at scale is the monetization model that makes free frontier AI economically sustainable long-term. The question isn't whether this will happen — it's whether regulators and users will force transparency requirements before the model becomes entrenched.”