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.
{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, consent and attribution
{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 spelling | Canonical 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.
| Canonical | Accepted aliases |
|---|---|
sub1 | p1, aff_sub, aff_sub1, s1, sub_id1, sub_id |
sub2 | p2, aff_sub2, s2, sub_id2 |
sub3 | p3, aff_sub3, s3, sub_id3 |
sub4 | p4, aff_sub4, s4, sub_id4 |
sub5 | p5, aff_sub5, s5, sub_id5 |
sub6 | p6, s6 |
sub7 | p7, s7 |
sub8 | p8, s8 |
sub9 | p9, s9 |
sub10 | p10, s10 |
sub11 | p11 |
sub12 | p12 |
sub13 | p13 |
sub14 | p14 |
sub15 | p15 |
source | source_id, src, site_id, af_siteid, pub_imp_id, placement |
sub_source | subsource |
creative | creative_id, cr_name, creative_name, ad_id, file_id |
campaign_ext | pub_camp_id, campaign, utm_campaign_id |
adgroup | adgroup, adset |
label | label |
url | dl, deeplink, adj_link, deep_link, target_url |
lp | url_id, uid, lp_id, landing_id |
prelander | prl |
cost | cost, media_cost |
cost_type | cost_type |
cost_currency | cost_currency |
cost_id | cost_id |
idfa | idfa, ios_ifa |
gaid | gaid, gps_adid, google_aid, advertising_id, android_adid |
android_id | android_id |
oaid | oaid |
idfv | idfv |
fire_adid | fire_adid |
app_id | app_id, bundle_id, package, package_name |
app_name | app_name |
click_id_ext | clickid, click_id, aff_click_id, alt_tid, ext_click_id, cid_ext |
gclid | gclid |
gbraid | gbraid |
wbraid | wbraid |
fbclid | fbclid |
ttclid | ttclid |
sccid | sccid, ScCid |
msclkid | msclkid |
twclid | twclid |
rdt_cid | rdt_cid |
li_fat_id | li_fat_id |
epik | epik |
yclid | yclid |
dclid | dclid |
utm_source | utm_source |
utm_medium | utm_medium |
utm_campaign | utm_campaign |
utm_term | utm_term |
utm_content | utm_content |
erid | erid |
coupon | __cc, cc, promo, coupon, coupon_code |
user_id | uid_ext, cid, customer_id, user_id |
email_hash | em, email_hash |
phone_hash | ph, phone_hash |
gdpr | gdpr |
gdpr_consent | gdpr_consent, tcf |
gpp | gpp |
us_privacy | us_privacy |
att | att, att_status |
test | test, is_test |
force_transparent | force_transparent |
ip_override | ip, ipaddr, ip_address |
ua_override | ua, user_agent |
Inbound conversion parameters
Parameters accepted by the postback, pixel and S2S endpoints (/p, /postback, /conversion, /px.gif).
| Canonical | Accepted aliases |
|---|---|
click_id | click_id, clickid, cid, transaction_id, tid, aff_click_id, _ef_transaction_id, dtk_click |
goal | goal, goal_id, goal_value, event, event_name, adv_event_id, g, event_id |
txn_id | txn_id, order_id, trans_id, ref_id, txid, transaction, adv_txn |
amount | amount, sale_amount, sale, revenue, rev, value, sum |
payout | payout |
currency | currency, cur |
status | status |
security_token | security_token, token, key, secret |
ts | ts, timestamp, date, click_time |
coupon | coupon, coupon_code, cc |
user_id | user_id, uid |
email | email, em |
phone | phone, ph |
ip | ip, ipaddr, conv_ip |
ua | ua, user_agent |
test | test |
adv1 | adv1 |
adv2 | adv2 |
adv3 | adv3 |
adv4 | adv4 |
adv5 | adv5 |
adv6 | adv6 |
adv7 | adv7 |
adv8 | adv8 |
adv9 | adv9 |
adv10 | adv10 |
device_id | device_id, gaid, idfa, android_id |