Cookie preferences

Choose which optional cookies EndFrame may use on this site. Analytics and advertising tools load only if you allow them, and you can change your mind any time from “Cookie settings” in the footer. Whatever you choose, this tab keeps the campaign labels from the link that brought you, and they are saved with your account if you sign up. Read the Cookie Policy.

Needed for the site to work, such as remembering this choice. Always on.

Lets us load analytics tools through Google Tag Manager, including Google Analytics and Microsoft Clarity session recordings, to understand how the site is used.

Allows advertising tags to measure our ad campaigns. None run on this site today. It also keeps ad click IDs from the page address for this tab, and saves them with your account if you sign up.

Skip to main content

UTM Parameters for TikTok Ads, Using TikTok's URL Macros

TikTok ads drive a lot of traffic that analytics tools struggle to label. This guide shows how to tag TikTok ads with UTM parameters, which of TikTok's macros to use for each field, and the checks that catch broken links before the budget goes out.

The EndFrame Team5 min read

TikTok campaigns can send a lot of visits, and many analytics setups label them poorly: some arrive as a referral from a TikTok domain, some as direct because the click opened in an in-app browser that did not pass a referrer, and none of them tell you which ad group or creative did the work. UTM parameters fix the labelling, and TikTok's macros mean you do not have to type campaign names into every URL by hand. This guide covers where to add them, which macros to use and how to check the result.

Where UTM parameters go in TikTok Ads Manager

UTM parameters are attached to the destination URL at ad level. When you create an ad that sends people to a website, TikTok Ads Manager offers a URL parameter option next to the destination URL: you can build parameters with its builder or edit the URL directly. TikTok also describes a URL auto-attach option that appends UTM parameters for you during ad creation. Whichever route you take, check the final URL in the ad preview before publishing, because the builder and auto-attach can both produce values you did not expect.

If you manage many ads, decide once whether you rely on auto-attach or on your own parameter string. Mixing the two gives you two naming styles for the same campaigns, which splits rows in every report. Keep the destination URL itself clean, pointing at the landing page with no parameters, and let the parameter string carry the tags. That way a landing page change is a single edit, and you never end up with a hand-typed utm_source in the URL fighting a different value added by the builder.

TikTok's URL macros

Macros are placeholders that TikTok replaces with real values when the ad is served. They are written in upper case between double underscores. The macros TikTok documents for campaign tracking at the time of writing:

MacroExpands toTypical UTM field
__CAMPAIGN_NAME__Campaign nameutm_campaign
__CAMPAIGN_ID__Campaign IDutm_id
__AID_NAME__Ad group nameutm_term
__AID__Ad group IDCustom key
__CID_NAME__Creative (ad) nameutm_content
__CID__Creative (ad) IDCustom key
__PLACEMENT__Placement type, such as TikTok or PangleCustom key

The A and C in the macro names do not match the level names you see in Ads Manager today, and that mismatch is the most common source of mistakes in TikTok tracking: people put __AID_NAME__ in utm_content expecting the ad name and get the ad group instead. Read the table above twice before you build the template.

A template you can paste

utm_source=tiktok&utm_medium=paid_social&utm_campaign=__CAMPAIGN_NAME__&utm_term=__AID_NAME__&utm_content=__CID_NAME__&utm_id=__CAMPAIGN_ID__&placement=__PLACEMENT__

Source and medium are static, because every click from this template is TikTok and every click is paid social. If you want the reasoning for that split, our guide to utm_source vs utm_medium covers it. The campaign, ad group and ad come from the macros, so GA4 shows the same names you see in Ads Manager. Keeping __CAMPAIGN_ID__ in utm_id gives you a stable join key even if names change.

Naming rules that keep reports clean

  • Write campaign, ad group and ad names in lower case. GA4 treats Spring_Sale and spring_sale as two campaigns.
  • Use hyphens or underscores instead of spaces, so values read cleanly in reports and exports.
  • Finalise names before publishing and test the preview URL. Do not assume a later rename will flow through to traffic already tagged.
  • Avoid characters such as &, ? and # in names, because they have meaning inside a URL.
  • Give ad group names an audience or targeting hint, so utm_term becomes a useful audience comparison.

Checking the setup before you spend

  1. 1Open the ad preview and confirm the destination URL shows real names, not the literal macro text.
  2. 2Open the URL in a private window and check that your site's redirects keep every parameter.
  3. 3Click a live ad on a phone and watch GA4 Realtime for tiktok / paid_social with the expected campaign.
  4. 4After a day, check Session default channel group: TikTok traffic should land in Paid Social, not Paid Other or Unassigned.

If you see macro names such as __CID_NAME__ in GA4, the macro was misspelled or used in a field that does not support it. If you see TikTok traffic as direct, the most likely cause is a destination URL without parameters, or a redirect that dropped them. Most TikTok clicks open in the app's own browser, which handles cookies and sessions differently from Safari or Chrome; our guide to in-app browsers and tracking explains what that does to your data.

Instant Pages and other non-website destinations

UTM parameters only do anything when a click reaches a page that runs your analytics. If an ad opens a TikTok Instant Page first, the visit you care about is the second click, from the Instant Page to your website. TikTok's help centre describes using links with UTM parameters on Instant Pages to bring people to pages where your Pixel is installed, so tag those outbound links with the same template. Lead forms that collect details inside TikTok never reach your site at all, so UTMs cannot record them; those leads need to come back through TikTok's own reporting or a CRM integration.

Reading TikTok results in GA4

Once traffic is tagged, open Reports, Acquisition, Traffic acquisition and filter Session source to tiktok. Set the primary dimension to Session campaign to compare campaigns, then add Session manual term as a secondary dimension to compare ad groups, or Session manual ad content to compare ads. Expect GA4's session counts to be lower than TikTok's click counts. Clicks that bounce before the page loads, visitors who decline analytics consent, and repeat clicks within one session all widen the gap. A gap that stays broadly stable over time is normal; a sudden jump usually means a broken link or a redirect change on your site.

UTMs are not the same as the click ID

TikTok can also add its own click identifier, ttclid, to ad clicks. That ID is for TikTok's measurement, used by the TikTok Pixel and the Events API to match conversions back to ads. UTMs are for your own analytics and CRM. You want both: UTMs to know which ad brought a visitor, and the click ID so TikTok can credit the conversion. The difference between the browser and server routes is covered in TikTok Pixel vs Events API, and the setup itself in our TikTok Events API guide.

Using the same structure across platforms

The template above deliberately mirrors the one we recommend for Meta, with campaign in utm_campaign, ad group or ad set in utm_term, and the ad in utm_content. Using one structure across every paid social platform means a single report compares them like for like. Our guide to UTM parameters for Facebook and Instagram ads shows the Meta version.

If you want those UTM values and the ttclid kept on every lead, EndFrame's first-party tracker captures them on arrival and sends conversions to the TikTok Events API server-side, alongside Meta and GA4.

Frequently asked questions

How are TikTok macros written?

TikTok macros are upper case words wrapped in double underscores, such as __CAMPAIGN_NAME__ or __CID__. Copy them exactly as TikTok's help centre lists them, and check the ad preview: if the URL still shows the macro text rather than a real value, the macro was not recognised.

What is the difference between __AID__ and __CID__?

In TikTok's macro table, __AID__ is the ad group ID and __CID__ is the creative ID, which corresponds to the individual ad. The _NAME versions return the names instead of the IDs. The letters do not match the level names in Ads Manager, so check the table before building a template.

What utm_medium should I use for TikTok ads?

Use a paid value such as paid_social or cpc, consistently. GA4 assigns Paid Social when the source is a recognised social site and the medium matches its paid pattern. Check after launch that TikTok sessions appear in Paid Social rather than Paid Other or Unassigned.

Try EndFrame

Add a server-side path for your conversions.

EndFrame collects events first-party and forwards conversions server-side to Meta, GA4, TikTok, and webhooks with event-ID deduplication — then credits each conversion to its campaign, with the visit-to-conversion path you can audit.

No credit card required

Keep reading