X (Twitter) Ads macros: the full list for tracking

November 19, 2026 · Hoplytic team · 2 min read

X (Twitter) Ads fills in macros on every click, so your tracker knows which campaign, ad group and ad it came from. Here is the full list we use, where it comes from, and how to set it up.

Short answer: X (Twitter) Ads adds its own click ID (twclid) to every ad click by itself.

The automatic click ID

X (Twitter) Ads appends twclid to the landing URL on its own. You don't add a macro for it: your tracker reads it from the URL and stores it with the click. Keep it intact: link shorteners or redirects that drop query strings will lose it.

Good to know

X has no reliable URL macros. Type the campaign name yourself, e.g. ?campaign=spring-sale, and we store it with each click.

https://go.yoursite.com/vpn-offer

X (Twitter) Ads replaces each macro when someone clicks. Your tracker stores the values, creates its own click ID, and passes it to the affiliate network's sub-ID so the sale can be matched back to this exact ad.

Sending conversions back to X (Twitter) Ads

X (Twitter) Ads has no click ID macro, so it can't receive sales back per click; judge placements on your tracker's reports instead.

Where this list comes from

X (Twitter) Ads doesn't document these publicly; they come from Sources conflict; no macros used. Check them in your X (Twitter) Ads account before launching. Platforms rename macros now and then: if a value arrives empty or literal, check X (Twitter) Ads' current list.

On Hoplytic

Pick X (Twitter) Ads in the link maker and these macros are added for you, and twclid is stored automatically. Reports can then group by any of them, for example campaign → ad → country, with cost, profit and ROAS. See every ad platform's macros or the guide to sub-ID tracking.

Questions people ask

What is the X (Twitter) Ads click ID?

X (Twitter) Ads adds twclid to the landing URL by itself. A tracker stores it with the click so the sale can be reported back to X (Twitter) Ads later.

Why does my tracker show the macro literally instead of a value?

The ad platform didn't fill it in. Usually the macro is misspelled, uses the wrong brackets, or the ad was created before the parameter was added. Copy the macro exactly as X (Twitter) Ads writes it and check a live click.

More in Traffic sources and macros

Also: tracking glossary · ad platform macros · Markdown copy