Skip to main content
Glossary · Tracking and tech

Macros — what it means in affiliate marketing

Dynamic placeholders in a tracking URL that the traffic source fills in at click time — placement, device, campaign, click ID.

A click reaches the tracker carrying whatever the source was told to put in the URL. Macros are the slots in that URL, replaced with real values at click time. Each ad network and tracker keeps its own set. Facebook writes {{campaign.name}} for campaign name; PropellerAds writes {country} for the user's two-letter country code. A working link can look like tracker.com/click?subid1={campaign_id}&subid2={creative_id}&subid3={country}&subid4={cost}. When the click happens, the network fills each slot and the tracker receives a fully populated URL. No second request is needed.

Without macros the buyer sees aggregate numbers only: spent X, earned Y. With them comes the breakdown — which creative, in which country, on which device produced the conversion, and what the click cost. That is what lets losing bundles be switched off and profitable ones scaled.

The macros that carry the most weight: click ID, which feeds the S2S postback; click cost, for ROI calculated in real time; geo and device, for segmentation.

The failure mode is quiet. Sources name the same value differently, so the format has to match what the tracker expects, or the data records incorrectly or not at all. A mistyped macro does not error out. It delivers a literal string where a value should sit, and the report reads as plausible while being wrong.

Updated 21 November 2026

Project sponsors

Companies that keep this analytics open