Tracking Macro Reference

Macros are placeholders written in curly braces. AffClix substitutes each one with a real value at the moment of the click or the conversion, which is how click data survives the redirect to an advertiser and finds its way back again.

How Macros Work

You write the token; the platform replaces it. A campaign URL containing {click_id} is stored with the token intact, and each visitor is redirected to a version with their own value substituted.

Stored campaign URL
https://advertiser.com/offer?cid={click_id}&geo={country}&src={sub_aff1}
What the visitor is redirected to
https://advertiser.com/offer?cid=a7f3c9e1b204&geo=US&src=newsletter

You do not have to type them. The All Macros panel on the campaign form lists every token with its description and inserts it at your cursor, and Quick Tokens below the URL field covers the common ones.

Core Identifiers

The tokens that identify what happened and who is involved.

MacroSubstituted with
{click_id}Unique ID of the recorded click. The key the advertiser returns on the postback.
{campaign_id}Campaign reference ID.
{campaign_name}Campaign name.
{affiliate_id}Affiliate reference ID.
{advertiser_id}Advertiser ID.
{source}Publisher source label.
{creativeid}Creative ID, for per-asset performance.
{timestamp}UTC timestamp of the click event.
{click_id} is the one that cannot be omitted

It is the only value that ties a conversion back to a specific click, affiliate and payout. A campaign URL without it will record clicks and never attribute a conversion.

Visitor and Device

MacroSubstituted with
{country}Country code resolved from the visitor IP.
{region}State or region name.
{ip}Visitor IP address.
{os}Operating system.
{os_version}OS version — for iOS 14, this is 14.
{user_agent}Full browser user agent string.
IP and user agent are personal data in most jurisdictions

Passing {ip} or {user_agent} to a third party may need a lawful basis and a processing agreement under GDPR and similar regimes. Only forward them where the advertiser has a documented reason — fraud checks, usually — and where your privacy notice covers it.

Affiliate Sub-IDs

Ten free-form slots the affiliate fills at click time, plus their own click identifier. These are the dimensions affiliates optimise on, and each becomes a filterable column in the Clicks Report.

MacroSubstituted with
{aff_click_id}The affiliate's own click ID, used for their postback reconciliation.
{sub_aff1} – {sub_aff10}Ten affiliate sub-ID slots.
Agree a slot convention and keep it

Reports only compare across campaigns if sub_aff1 means the same thing everywhere. A common convention is source, creative, placement, ad set, then variant.

Mobile Advertising IDs

Required for app install attribution and for matching against an MMP's own records.

MacroSubstituted with
{gaid}Google Advertising ID (Android).
{iosidfa}iOS IDFA.
{androidid}Android ID.
{deviceid}Generic device identifier.

On iOS the IDFA is only available when the user has granted App Tracking Transparency permission, so expect it to be empty far more often than not. See Probabilistic Attribution for how installs are matched when no device ID is present.

Platform Click IDs

Ad platform click identifiers. Capture these on the click if you intend to send conversions back to the ad platform through a Conversions API — without the click ID, the platform cannot match your conversion to its own ad spend.

MacroPlatform
{fbclid}Meta (Facebook and Instagram)
{gclid}Google Ads
{dclid}Google Display
{gbraid}, {wbraid}Google, iOS app and web-to-app journeys
{ttclid}TikTok
{msclkid}Microsoft and Bing

Postback-Only Tokens

These are populated by the advertiser on the conversion postback rather than at click time. They appear in affiliate postbacks so you can forward conversion detail on to your partners.

MacroSubstituted with
{transaction_id}Unique per conversion. Used for deduplication.
{order_id}The advertiser's order or action reference.
{status}Conversion status returned by the advertiser.
{sub_adv1} – {sub_adv6}Six advertiser-side pass-through slots.
Send transaction_id or order_id on every postback

Advertisers retry postbacks. Without a unique reference, a retry is indistinguishable from a second genuine sale, and you will pay an affiliate twice for one order.

Where to Use Them

LocationTypical tokens
Campaign URL{click_id} always, plus {country}, {sub_aff1} and any device ID the advertiser needs.
Landing page URLsThe same tokens. They are not inherited from the campaign URL.
Affiliate postback{aff_click_id}, {payout}, {status}, {transaction_id}.
Impression URL{campaign_id}, {affiliate_id}, {creativeid}.

Common Mistakes

MistakeResult
Square brackets or percent signs instead of curly bracesThe token is passed through literally and the advertiser receives the text, not a value.
A typo in the token nameSilently substituted as empty. Nothing errors — the parameter simply arrives blank.
Tokens on the campaign URL but not on landing pagesTraffic routed to a landing page loses attribution entirely.
Not URL-encoding values that may contain & or spacesThe advertiser's parameter parsing breaks at the first unescaped separator.
Assuming the advertiser reads click_idEvery platform names it differently. Confirm which parameter they expect before launch.

The Link Tester shows the fully substituted URL for a simulated click, which is the fastest way to catch all of the above before real traffic does.

Rate this article
★★★★★
Thanks for rating!

Was this article helpful?