Home

ChatGPT Ads URL parameters: UTMs, dynamic macros and oppref

How to tag ChatGPT Ads traffic: the four dynamic macros, where to set query parameters, which level wins, and why oppref must survive redirects.

Published Sep 28, 2026 · 13 min read

What are URL parameters in ChatGPT Ads?

URL parameters are the key and value pairs after the question mark in a landing page address. In ChatGPT Ads they carry two different things, and it helps to keep them apart from the first day.

The first kind is yours: UTM tags and any other query parameters you define. OpenAI states that static tracking parameters such as UTMs persist on ad clicks and can be used in existing analytics tools to understand traffic from ChatGPT Ads.

The second kind is OpenAI's: a click reference called oppref, appended to the end of the landing page URL. It exists so OpenAI can connect a later conversion to the ad click.

Your parametersoppref
Who sets itYou, in Ads Manager or the URLOpenAI, automatically
What it describesCampaign, ad group, ad, accountOne ad click
Who reads itYour analytics and CRMOpenAI's conversion measurement

You need both. UTMs and IDs feed your own reports. The click reference feeds the Conversions column in Ads Manager and gives conversion campaigns the signal they optimize on.

Which dynamic macros does ChatGPT Ads support?

Four. A macro is a placeholder that Ads Manager replaces with a real value when the ad is delivered. OpenAI lists these supported macros for landing page query parameters:

MacroReplaced withUseful for
{campaign_id}The campaign's IDBudget and campaign reporting
{ad_group_id}The ad group's IDSplitting results by targeting theme
{ad_id}The ad's IDComparing creatives
{ad_account_id}The ad account's IDAgencies and multi-brand advertisers

OpenAI states that Ads Manager populates supported macros automatically at delivery time. That means the value is resolved when the ad is served, not when you save the setting.

In our judgment, {ad_group_id} is the one most advertisers underuse. In this channel the ad group holds the context hints, the bid and the audience settings, so an ad group ID on a lead tells you which intent theme produced it.

One more placeholder appears in OpenAI's developer documentation. The Campaign Management page shows a template ending in click_id={oppref}, which copies the click reference into a parameter name of your choice. The help center's list of macros does not include it, so treat it as an API-documented option and test it before you rely on it.

How do I add UTM parameters to ChatGPT Ads?

There are three documented ways. Pick one as your standard and use the others only for exceptions.

In Ads Manager. OpenAI's steps are:

  1. Open the Campaigns, Ad groups or Ads page.
  2. Open the three-dot menu on a row and choose Edit campaign, Edit ad group or Edit ad.
  3. In the edit window, find Landing page query parameters.
  4. Add the parameters you want appended to landing page URLs, then save.

Directly in the destination URL. OpenAI's creative guidance says you can add tracking parameters directly to destination URLs and include your own UTM parameters for each creative. This suits advertisers who tag every ad by hand.

Through the Ads API. The field is landing_page_configuration.query_string_template, and OpenAI states it can be added at the campaign, ad-group or ad level. The campaign example in the developer documentation uses this template:

utm_source=openai&utm_medium=paid&utm_campaign={campaign_id}&utm_content={ad_id}

Note that the template is a query string only. It has no leading question mark and no domain, because it is appended to whatever landing page each ad already points to.

What should a tracking template look like?

A good template has a fixed half that people can read and a dynamic half that machines can join on. This is our recommendation, not an OpenAI requirement.

ParameterValueWhy
utm_sourceA fixed name for the channelOne stable source in every report
utm_mediumA fixed paid mediumGroups with your other paid traffic
utm_campaign{campaign_id} or your own labelCampaign split
utm_content{ad_id}Creative split

Google's guidance for Analytics is that when you add parameters to a URL you should always use utm_source, utm_medium and utm_campaign. It describes utm_content as the parameter used to differentiate creatives, and it recommends one unique utm_source for each distinct platform. Whatever source name you choose, choose it once. OpenAI's own example uses openai. Many advertisers prefer chatgpt. Either works, as long as every campaign uses the same one.

If you want the ad group as well, add a parameter of your own, for example oai_adgroup={ad_group_id}. A prefix such as oai_ keeps your keys from colliding with another platform's parameters on a shared landing page. Again, that is our convention, not a documented rule.

A few habits keep a template working:

  • Write macros exactly as documented, in lowercase with underscores and single braces.
  • Put macros in values. Every documented example has the macro on the right of the equals sign.
  • Keep personal data out. URLs end up in logs, analytics tools and browser history.
  • Change the template deliberately. A changed key splits your history into two rows.

Which level wins when parameters conflict?

The more specific setting wins. OpenAI's help center gives this hierarchy:

  1. Ad URL
  2. Ad
  3. Ad group
  4. Campaign

If a parameter is already set in the ad's URL, settings at the campaign, ad group or ad level will not overwrite it.

The developer documentation adds two details. First, parameters from different levels combine, so a campaign template and an ad-level addition both reach the landing page. Precedence only matters for a duplicate parameter. Second, the API's order runs one step further: existing destination URL, ad, ad group, campaign, then ad account.

In practice, set one template at campaign level using macros. Every ad group and ad below inherits it, and new ads are tagged without anyone remembering to do it. Override lower down only when one ad truly needs a different value.

The rule has a side effect worth knowing. If someone pasted a hand-written utm_campaign into an ad's destination URL months ago, your new campaign template will not replace it. When a report shows one ad with an odd campaign value, check the ad's URL first.

What is oppref and how is it different from a UTM?

oppref is the OpenAI click reference. OpenAI states that it is appended to the end of the landing page URL, and gives the format www.openai.com?oppref=gAAAAAb123. The developer documentation calls it a privacy-preserving identifier, and the Conversions API reference calls it an opaque, OpenAI-provided attribution identifier that you pass as the original string without modification.

What happens to it depends on how you send conversions:

IntegrationDoes it capture oppref for you?
OpenAI PixelYes. It reads the URL and stores the value in a first-party __oppref cookie
Conversions APINo. You capture the value and send it with the server event
Image tagNo. Pass it only when your page already has the value

The pixel asks for a cookie lifetime of 30 days after it writes the cookie. Each time the pixel captures a non-empty oppref from a URL, it resets the expiry to 30 days. Reading the stored cookie on a visit without the parameter does not extend it. OpenAI notes that browser restrictions or clearing cookies can shorten these lifetimes, and that calling oaiq("consent", false) removes the cookie.

OpenAI also says cookie expiry is separate from conversion attribution windows. The cookie lifetime describes browser storage only. Reporting windows are chosen in Ads Manager, where the click-through window can be 7, 14 or 30 days. See ads reporting and privacy for that side.

The full pixel and server setup is covered in conversion tracking.

Why do parameters go missing between the click and the page?

Almost always because something between the ad and the final page rewrites the URL. OpenAI asks advertisers to preserve oppref through redirects and landing-page navigation, and its event quality guidance says to test the full path, including tracking links, redirects, checkout, and any handoff between browser and server.

From our experience, these are the usual causes:

  • A redirect from one domain or path to another that drops the query string.
  • A link shortener or tracking redirect placed in front of the landing page.
  • A cookie banner or script that reloads the page on a clean URL.
  • A landing page tool or single-page app that rewrites the URL on first navigation.
  • A form on a second page that never saw the original parameters.

The same faults remove your UTMs and IDs, not only the click reference. So one test covers both: click a live ad, follow every hop, and read the address bar on the final page.

OpenAI's event quality page adds a warning for server-side setups: do not reuse another person's click information or substitute a default value. A missing reference should stay missing.

When the reference is lost, automatic advanced matching can help. OpenAI describes it as a way to connect website conversions to your ads when a click identifier is unavailable. It is a fallback, not a substitute.

Do not judge macros from a preview. OpenAI states that macros are populated at delivery time and that an ad preview shows appearance. In our view the only reliable check is a real click on a serving ad. If the ad is not delivering yet, see why ChatGPT ads are not serving.

How do I read the parameters in Google Analytics?

UTM parameters need no setup. Google states that when a user clicks a link, the URL parameters are sent to Analytics and the parameter values are visible in the Traffic acquisition report.

Custom keys, such as an ad group parameter, need more work. Google describes the sequence for any custom data:

  1. Add an event parameter or user property to your website code.
  2. A user visits and the custom data is sent to Google Analytics.
  3. Create a custom dimension so you can analyze the data.
  4. After 24-48 hours, you can start to report on the custom dimension.

Google's documented limit for a standard property is 50 event-scoped custom dimensions and 25 user-scoped ones. Three or four ID dimensions fit easily, but they are not free, so register only the ones you will report on.

One step is ours, not Google's: store the values on arrival. A parameter that exists only on the landing page is gone by the time a visitor converts three pages later. Save it in first-party storage when the visitor lands, in line with your consent rules, and read it back when the conversion fires.

Why do clicks in Ads Manager not match sessions in analytics?

Because they measure different things. OpenAI explains that ad clicks measure ad interactions, while analytics sessions depend on page load, redirects, consent settings, browser blocking, UTM handling, attribution windows and time zone settings.

To compare fairly, OpenAI's advice is to use the same date range and the same time zone, then use CSV exports to check campaign and ad-level activity.

Timing matters too. OpenAI states that impressions, clicks and CTR typically refresh approximately every 15 minutes, that spend insights are delayed by approximately 7-8 hours, and that attributed conversions can take 24-48 hours to appear. Comparing today's numbers across two tools will rarely agree.

A difference does not necessarily indicate an error. That sentence is OpenAI's, from its conversion measurement page.

How do I pass campaign and ad IDs into a CRM?

Capture them at the form. For lead generation, the value of tagging shows up after the form is submitted, because revenue lives in the CRM and not in Ads Manager.

  1. Read the parameters when the visitor lands and store them.
  2. Add hidden fields to every form for the campaign, ad group and ad values.
  3. Map those fields to properties on the lead record.
  4. Check that the values survive when a lead becomes a deal or opportunity.

With {campaign_id}, {ad_group_id} and {ad_id} on every lead, you can see which ad group produced the leads that became customers, not only which ad produced clicks.

Macros return IDs, not names. The documented macros are all IDs, and OpenAI lists no macro for a campaign or ad group name. Keep a lookup table from ID to name and add a row whenever you create a campaign or ad group. The Ads API reporting endpoints accept campaign_id as a field, so an API user can rebuild the lookup from a report.

IDs have one real advantage over labels. A name can be edited at any time, while the ID stays the same, so old and new rows still join.

This is also the basis for sending qualified leads back to OpenAI as conversion events, covered in conversion campaigns.

Do URL parameters work with product feeds and measurement partners?

Yes, with a few documented specifics.

Product feed campaigns. In a feed campaign the selected product supplies the destination URL. OpenAI states that to add tracking parameters to product URLs you use landing_page_configuration on the campaign, ad group or ad. Separately, OpenAI's commerce best practices suggest adding feed attribution parameters to the product url field, with utm_medium=feed as the example, and keeping internal tracking parameters consistent across snapshots. More in our product feed guide.

Measurement partners. OpenAI's partner instructions mention URL tagging in three places:

PartnerWhat OpenAI's setup steps say
Triple WhaleContinue applying Triple Whale UTMs to your ChatGPT Ads campaigns
FosphaShare your UTM setup along with the API key
BranchUse a Branch Ad Link as the destination URL and keep Branch's macros in the Landing page query parameters field

If you use one of these tools, its parameters come first and your own template must not overwrite its keys. See measurement partners.

Frequently asked questions about ChatGPT Ads URL parameters

What dynamic URL parameters does ChatGPT Ads support?

OpenAI's help center lists four supported macros: {campaign_id}, {ad_group_id}, {ad_id} and {ad_account_id}. Ads Manager populates them automatically at delivery time. You can mix them with your own fixed text.

Where is the setting in Ads Manager?

Open the three-dot menu on the Campaigns, Ad groups or Ads page, choose the matching Edit option, and use the field named Landing page query parameters.

Will a campaign-level template overwrite UTMs already in my ad URL?

No. OpenAI states that if a parameter is already set at the Ad URL level, campaign, ad group or ad-level settings will not overwrite it.

Can I see the campaign name instead of the ID?

Not through a macro. The four documented macros return IDs. Write a readable label as fixed text in the template, or keep a lookup table from ID to name.

Is oppref a UTM parameter?

No. It is OpenAI's click reference, added automatically, and it identifies the click for conversion measurement. UTMs are labels you choose for your own analytics. OpenAI asks you to preserve oppref through redirects and landing-page navigation.

How long does the pixel remember oppref?

OpenAI's developer documentation gives the __oppref cookie an expiry of 30 days after the pixel writes it, and notes that browser restrictions or clearing cookies can shorten that.

Do I need to send oppref with server-side events?

Yes, when it is available. OpenAI states that the Conversions API does not capture oppref for you, so you capture the value yourself and pass it unchanged with the server event.

Can I put customer details in a URL parameter?

Do not. OpenAI's image tag documentation says not to put personal data, secrets, session IDs, customer identifiers or order identifiers in any query parameter. We apply the same rule to landing page URLs.

Why does my report show the macro text instead of a number?

OpenAI does not document this case. In our experience the causes are a misspelled macro, a macro that is not one of the supported four, or a URL copied from a preview instead of a delivered ad. Verify with a real click before changing anything.

Do I still need conversion tracking if I use UTMs?

Yes. UTMs only inform your own tools. The Conversions column in Ads Manager and conversion-optimized delivery depend on events sent through the pixel or the Conversions API. Start with conversion tracking, and see the glossary for any term used here.

Want it done for you? Lead handling for ChatGPT Ads: every lead in one inbox, marked real or not