Skip to content
Docs

Tracking guide

Macros and parameters reference

This page is generated from packages/contracts/macros.yaml, the single registry used by the edge redirect, the ingest service, the postback dispatcher and the link tester.

Outbound macro syntax

Macros are used in destination URLs, partner postback URLs, bodies and headers, dual-postback forwards and CAPI templates. Webhooks are not templated: they send the event JSON, whose *_id fields are the API ids.

text
{name}, modifiers {name|urlencode}, {name|md5}, {name|sha1}, {name|sha256}, {name|upper}, {name|lower}, {name|default:x}, fallback {a||b}, raw param {param:foo}; unavailable -> empty (or drop param per template setting)

Example: https://adv.example/p?cid={click_id}&sub={sub1|urlencode}&uid={idfa||gaid}&rev={payout|default:0}.

Identifiers

{click_id} {transaction_id} {conversion_id} {offer_id} {offer_hash} {offer_name} {external_offer_id} {partner_id} {partner_hash} {partner_name} {advertiser_id} {advertiser_name} {goal_id} {goal_key} {goal_name} {event_name} {lp_id} {lp_name} {creative_id} {creative_name} {smartlink_id} {smartlink_hash} {coupon} {txn_id} {order_id} {user_id} {app_id} {app_name} {offer_ulid} {partner_ulid} {advertiser_ulid} {goal_ulid} {lp_ulid} {creative_ulid} {smartlink_ulid}

{offer_id}, {partner_id}, {advertiser_id}, {goal_id}, {lp_id}, {creative_id} and {smartlink_id} are the numeric ids shown in the portals, the same in redirects, partner postbacks and forwards. Integrations that need the internal API ids use {offer_ulid}, {partner_ulid}, {advertiser_ulid}, {goal_ulid}, {lp_ulid}, {creative_ulid} and {smartlink_ulid}; {offer_hash}, {partner_hash} and {smartlink_hash} are the public hashes. Until October 2026 postbacks sent the internal ids for these macros and {smartlink_id} was the hash.

Traffic parameters

{sub1} {sub2} {sub3} {sub4} {sub5} {sub6} {sub7} {sub8} {sub9} {sub10} {sub11} {sub12} {sub13} {sub14} {sub15} {source} {sub_source} {adv1} {adv2} {adv3} {adv4} {adv5} {adv6} {adv7} {adv8} {adv9} {adv10} {campaign_ext} {adgroup} {label} {utm_source} {utm_medium} {utm_campaign} {utm_term} {utm_content} {erid} {click_id_ext} {gclid} {gbraid} {wbraid} {fbclid} {fbc} {fbp} {ttclid} {msclkid} {sccid} {twclid} {rdt_cid}

Device, geo and network

{ip} {ua} {country} {region} {city} {postal} {dma} {isp} {carrier} {asn} {connection} {device} {brand} {model} {os} {os_version} {browser} {browser_version} {language} {idfa} {gaid} {android_id} {oaid} {idfv} {app_version} {is_proxy} {fraud_score}

Time

{click_time} {click_ts} {conv_time} {conv_ts} {ctit} {install_time} {date} {hour} {unix} {random} {nonce}

Money

{payout} {payout_cents} {payout_ccy} {revenue} {revenue_ccy} {sale_amount} {cost} {profit} {currency}

{status} {status_reason} {is_test} {attribution_method} {match_type} {is_organic} {is_reattribution} {skan_cv} {skan_coarse} {consent_tcf} {consent_gpp} {gpc} {att_status}

Security

{security_token} {hmac}

Legacy spellings in templates

Templates imported from other platforms keep working: the left-hand spelling is rewritten to the canonical macro.

Template spellingCanonical macro
{p1}{sub1}
{p2}{sub2}
{p3}{sub3}
{p4}{sub4}
{p5}{sub5}
{p6}{sub6}
{p7}{sub7}
{p8}{sub8}
{p9}{sub9}
{p10}{sub10}
{aff_sub}{sub1}
{aff_sub2}{sub2}
{aff_sub3}{sub3}
{aff_sub4}{sub4}
{aff_sub5}{sub5}
{source_id}{source}
{aff_click_id}{click_id}
{clickid}{click_id}
{txn_id}{txn_id}
{sale}{sale_amount}
{gps_adid}{gaid}
{af_siteid}{source}
{offer_id}{offer_id}
{aff_id}{partner_id}
{affiliate_id}{partner_id}
{affid}{partner_id}
{oid}{offer_id}
{campaign_id}{offer_id}
{pub_id}{partner_id}

Inbound click parameters

Parameters accepted on a tracking link. Names are case-insensitive; the first matching alias wins and the value is stored under the canonical name.

CanonicalAccepted aliases
sub1p1, aff_sub, aff_sub1, s1, sub_id1, sub_id
sub2p2, aff_sub2, s2, sub_id2
sub3p3, aff_sub3, s3, sub_id3
sub4p4, aff_sub4, s4, sub_id4
sub5p5, aff_sub5, s5, sub_id5
sub6p6, s6
sub7p7, s7
sub8p8, s8
sub9p9, s9
sub10p10, s10
sub11p11
sub12p12
sub13p13
sub14p14
sub15p15
sourcesource_id, src, site_id, af_siteid, pub_imp_id, placement
sub_sourcesubsource
creativecreative_id, cr_name, creative_name, ad_id, file_id
campaign_extpub_camp_id, campaign, utm_campaign_id
adgroupadgroup, adset
labellabel
urldl, deeplink, adj_link, deep_link, target_url
lpurl_id, uid, lp_id, landing_id
prelanderprl
costcost, media_cost
cost_typecost_type
cost_currencycost_currency
cost_idcost_id
idfaidfa, ios_ifa
gaidgaid, gps_adid, google_aid, advertising_id, android_adid
android_idandroid_id
oaidoaid
idfvidfv
fire_adidfire_adid
app_idapp_id, bundle_id, package, package_name
app_nameapp_name
click_id_extclickid, click_id, aff_click_id, alt_tid, ext_click_id, cid_ext
gclidgclid
gbraidgbraid
wbraidwbraid
fbclidfbclid
ttclidttclid
sccidsccid, ScCid
msclkidmsclkid
twclidtwclid
rdt_cidrdt_cid
li_fat_idli_fat_id
epikepik
yclidyclid
dcliddclid
utm_sourceutm_source
utm_mediumutm_medium
utm_campaignutm_campaign
utm_termutm_term
utm_contentutm_content
eriderid
coupon__cc, cc, promo, coupon, coupon_code
user_iduid_ext, cid, customer_id, user_id
email_hashem, email_hash
phone_hashph, phone_hash
gdprgdpr
gdpr_consentgdpr_consent, tcf
gppgpp
us_privacyus_privacy
attatt, att_status
testtest, is_test
force_transparentforce_transparent
ip_overrideip, ipaddr, ip_address
ua_overrideua, user_agent

Inbound conversion parameters

Parameters accepted by the postback, pixel and S2S endpoints (/p, /postback, /conversion, /px.gif).

CanonicalAccepted aliases
click_idclick_id, clickid, cid, transaction_id, tid, aff_click_id, _ef_transaction_id, dtk_click
goalgoal, goal_id, goal_value, event, event_name, adv_event_id, g, event_id
txn_idtxn_id, order_id, trans_id, ref_id, txid, transaction, adv_txn
amountamount, sale_amount, sale, revenue, rev, value, sum
payoutpayout
currencycurrency, cur
statusstatus
security_tokensecurity_token, token, key, secret
tsts, timestamp, date, click_time
couponcoupon, coupon_code, cc
user_iduser_id, uid
emailemail, em
phonephone, ph
ipip, ipaddr, conv_ip
uaua, user_agent
testtest
adv1adv1
adv2adv2
adv3adv3
adv4adv4
adv5adv5
adv6adv6
adv7adv7
adv8adv8
adv9adv9
adv10adv10
device_iddevice_id, gaid, idfa, android_id