utm.new
guide ·

TikTok dynamic UTM parameters: the macro guide (and the __AID__/__CID__ trap)

TikTok's dynamic UTM macros are easy to misread — __AID__ is the ad group, __CID__ is the creative. Here's the copy-ready template, the syntax rule, and the ttclid story.

TikTok will substitute campaign details into your URLs automatically — if you use the right macros. The catch is that TikTok’s macro names don’t mean what they look like, and the syntax has a one-character failure mode that produces no error. Get either wrong and your TikTok reporting is mislabeled or missing, with nothing to tell you why.

Here’s the whole thing: the macros, what they actually resolve to, the copy-ready template, and the click ID you should never touch.

The trap, first

TikTok’s hierarchy is Campaign → Ad group → Ad. The macros do not line up with those names the way you’d expect:

  • __AID__ looks like “ad ID.” It’s the ad group ID.
  • __CID__ looks like “campaign ID.” It’s the creative ID.
  • The actual campaign ID is __CAMPAIGN_ID__.
  • The actual ad ID is __ADID_V2__ — and only on upgraded Smart+ campaigns.

If you wanted to tag the ad and reached for __AID__, you tagged the ad group. If you read CID as campaign, every creative-level row in your report is mislabeled. This is the single most common TikTok UTM mistake, and because the substitution still “works,” nothing flags it.

The macro list

MacroResolves to
__CAMPAIGN_NAME__ / __CAMPAIGN_ID__Campaign
__AID_NAME__ / __AID__Ad group (not ad)
__CID_NAME__ / __CID__Creative (not campaign)
__ADID_V2_NAME__ / __ADID_V2__Ad — Smart+ campaigns only
__PLACEMENT__Where it rendered (TikTok, TikTok Pangle)

The syntax rule that breaks silently

Every TikTok macro is wrapped in two underscores at each end. __CAMPAIGN_ID__ works. _CAMPAIGN_ID_ does not — TikTok can’t match a single-underscore token and passes the literal text straight into your URL. No warning, no substitution, just utm_id=_CAMPAIGN_ID_ showing up in your analytics.

So when you see raw macro text in a landing-page URL, the cause is almost always a single-underscore typo from hand-editing. Re-copy the template and check both ends of every token.

The copy-ready template

Standards-only — the six UTM parameters every analytics tool understands, no custom fields:

utm_source=tiktok&utm_medium=cpc&utm_campaign=__CAMPAIGN_NAME__&utm_id=__CAMPAIGN_ID__&utm_term=__CID_NAME__&utm_content=__AID_NAME__

A few decisions baked into that:

  • utm_source=tiktok, lowercase, no -ads suffix. GA4 treats source as case-sensitive, so TikTok and tiktok split into two rows. This is the same casing discipline that keeps every channel clean — see UTM parameters best practices.
  • utm_id=__CAMPAIGN_ID__. The numeric campaign ID is rename-safe and it’s GA4’s join key for tying cost data back to behavior — the reason utm_id quietly became the most important UTM.
  • utm_term=__CID_NAME__. TikTok has no keyword concept (it’s an interest feed, not search), so utm_term has no native meaning. The convention borrows it for the creative name; utm_content carries the ad group. Document that mapping so your team reads the columns correctly.

The full token-by-token reference, including the Smart+ __ADID_V2__ level and the non-standard placement/site macros, lives on the TikTok Ads platform page.

Don’t add ttclid

TikTok appends ttclid — its click ID — to your landing-page URL automatically on every ad click. You don’t configure it, and you shouldn’t add it to your template. Hand-adding &ttclid=… creates a duplicate, and the wrong copy may be the one your Pixel or the Events API persists, which quietly degrades attribution.

What you should do is capture and store the auto-appended ttclid on landing, then attach it to the conversion you send back. Drop it and you lose attribution accuracy even with server-side tracking running. That click-ID-plus-UTM reconciliation — keeping the platform’s click identifier and your UTMs joined through to the conversion — is the harder half of measurement, and the part AnyTrack is built to handle.

Where to set it, and the auto-UTM toggle

UTM parameters go in at the ad level, in the destination-URL section of TikTok Ads Manager. TikTok also offers to add utm_source/utm_medium automatically — but that fills them with its own values and can collide with a manual template, producing duplicate or conflicting parameters. Pick one. For a consistent convention across TikTok, Meta, and everything else, build the template yourself with the builder and leave the auto toggle off.

Meta’s tokens work the same way conceptually but use a completely different syntax — double curly braces instead of double underscores. If you run both platforms, Facebook & Meta dynamic UTM parameters covers that side and the muscle-memory mistakes that come from switching between them.

The 5-minute check

  1. Build the template once, from the builder, so casing and macros are correct by construction.
  2. In the ad’s URL preview, confirm every macro is double-underscored and mapped to the level you meant — especially __AID__ (ad group) vs __CID__ (creative).
  3. Click your own ad and inspect the landing URL: macros resolved to real values, and ttclid appended automatically.
  4. In GA4, confirm the session lands as tiktok / cpc under Paid Social — not split across casing variants, not in Unassigned.

Tag it right once and TikTok stays a single clean line in every report. For the receiver-side mechanics of how that session gets classified, the Google Analytics reference is the place to go next.