This article is the reference for setting up tracking between Swaarm and your advertiser. It covers the macros you add to the advertiser tracking link and the postback parameters the advertiser sends back to Swaarm when a conversion occurs.
ℹ️ Looking for step-by-step setup instructions? See Create and configure an advertiser →
How S2S tracking works
Swaarm uses server-to-server (S2S) tracking - the standard method in performance marketing. Here's the flow at a high level:
A user clicks the publisher's ad and is redirected through Swaarm
Swaarm records the click and assigns a unique click ID
Swaarm forwards the user to the advertiser's offer (via their MMP or direct link)
The advertiser's platform / MMP stores the Swaarm click ID
When the user converts (installs, purchases, etc.), the advertiser platform / MMP fires a postback to Swaarm containing the click ID
Swaarm matches the postback to the original click and credits the publisher
The click ID / PEA chain is the thread that connects everything - without it, Swaarm cannot match the conversion back to the click.
Click Macros for Advertiser Tracking Link
These macros are added to the advertiser's tracking URL. Swaarm fills them in dynamically at the time of each click.
⚠️ {id} (click id) or {pea.chain} (token for privacy-enabled attribution conversions) are mandatory. The advertiser must pass it back in their postback URL so Swaarm can match the conversion to the click. Without it, conversions will appear in the Postback Log as unattributed.
Core macros
Macro | Description | Example |
| Swaarm click ID |
|
| Non-unique token generated by Swaarm (used for privacy-enabled attribution) |
|
Publisher macros
Macro | Description | Example |
| Swaarm Publisher ID |
|
| Publisher's own click ID |
|
| Publisher sub ID |
|
| Publisher sub sub ID |
|
| Publisher group original sub ID |
|
| Publisher group original publisher ID |
|
| Publisher app name or ID |
|
| Publisher app store ID |
|
| Publisher site identifier |
|
| Publisher placement identifier |
|
| Publisher creative ID or name |
|
| Publisher custom value 1 |
|
| Publisher custom value 2 |
|
| Publisher custom value 3 |
|
| Publisher custom value 4 |
|
| Publisher custom value 5 |
|
| Search term (keyword) |
|
Offer macros
Macro | Description | Example |
| Swaarm offer ID |
|
| Offer name |
|
| Revenue per conversion |
|
| Payout per conversion |
|
| Encrypted WeGet value for Appsflyer | big string value |
| Appsflyer click signing signature | big string value |
Device & user macros
Macro | Description | Example |
| Apple iOS advertising identifier |
|
| Google advertising identifier |
|
| SHA1-hashed IDFA |
|
| SHA1-hashed GAID |
|
| Identifier for Vendor (IDFV) |
|
| Country code |
|
| City |
|
| Region or state |
|
| Device operating system |
|
| OS version |
|
| Device manufacturer |
|
| Device model |
|
| Device IP address |
|
| Device language |
|
| URL-encoded device language |
|
| User agent string |
|
| URL-encoded user agent string |
|
| Device carrier |
|
| HTTP referrer |
Time macros
Macro | Description | Example |
| Date of click |
|
| Date and time of click |
|
| Unix timestamp of click |
|
ATT / iOS privacy macros
Apple's iOS 14.5+ App Tracking Transparency (ATT) framework requires MMPs to pass additional parameters on click and impression URLs. Swaarm supports the following ATT macros for the advertiser tracking link:
Macro | Description | Example |
| ATT authorisation status |
|
| ATT authorisation detail |
|
| Time in seconds the user took to respond to ATT prompt |
|
| Unix timestamp of ATT authorisation |
|
| Identifier for Vendor (IDFV) - used as a privacy-safe alternative to IDFA | 3K0XXXXX-83XX-HEXX-KIXX-29KH83XXXXXX |
🔗 Sample ATT tracking link:
ℹ️ Publishers pass ATT values into Swaarm using their own parameters: att, att_time, att_duration, att_detail, idfv, traffic_type on the click URL. See Publisher tracking details → for the corresponding publisher-side parameters.
To get to know more about SKAdNetwork and ATT tracking, go to SKAd Network.
MMP-specific transform macros
Macro | Description |
| Transforms
|
| Transforms
|
| Transforms
|
🔗 Sample advertiser tracking link
Postback Parameters Supported by SWAARM
These are the parameters the advertiser (or their MMP) can pass back to Swaarm in the postback URL when a conversion occurs.
🔗 Sample postback URL
https://track.{yourdomain}.swaarm-clients.com/postback?click_id=[Click ID macro for Advertiser]&event_id=[Advertiser Event ID/name Macro]&sale_amount=[Payout per conversion macro]&gaid=[Google Advertising ID macro]&idfa=[iOS advertising ID Macro]
Core parameters
Parameter | Description | Example |
| Swaarm click ID |
|
| A non-unique token generated by the Swaarm platform | e6UKM7lLUwlwAWXUyN |
| ID of the conversion event |
|
| Swaarm's internal event type ID for which the event was attributed |
|
| Name of the conversion event |
|
| JSON object with custom event data |
|
| Swaarm offer ID |
|
| Swaarm publisher ID |
|
| Swaarm publisher sub ID |
|
| Advertiser's status for the conversion |
|
| Advertiser's reason for rejected attribution |
|
| Value related to the rejection |
|
| Sub-value related to the rejection |
|
Revenue & sale parameters
Parameter | Description | Example |
| Total revenue generated by the user for this event (e.g. purchase value). Used to calculate ROAS. |
|
| Payout amount received from the advertiser for this conversion. Used for dynamic payouts instead of a fixed amount. |
|
| Currency of the sale amount |
|
| Revenue in crypto per conversion |
|
| Currency of the revenue in crypto |
|
Device & app parameters
Parameter | Description | Example |
| Google Advertising ID |
|
| iOS IDFA |
|
| Publisher app ID |
|
| Publisher app name |
|
| App version |
|
| Device OS |
|
| Device OS version |
|
| Device language |
|
| Device user agent string | Mozilla%2F5.0+%28iPhone%3B+CPU+iPhone+OS+10_3_1+like+Mac+OS+X%29+AppleWebKit%2F603.1.30+%28KHTML%2C+like+Gecko%29+Version%2F10.0+Mobile%2F14E304+Safari%2F602.1 |
| Device model number |
|
| Device manufacturer name |
|
| User device IP |
|
| CPU type of the device |
|
| Hardware name of the device |
|
| Internet connection type |
|
| Internet service provider |
|
| Network type |
|
| Two-character country code |
|
| Region code |
|
| City |
|
| Postal code based on IP |
|
Timestamp parameters
Parameter | Description | Example |
| Click timestamp from advertiser SDK |
|
| Conversion timestamp from advertiser SDK |
|
| First app open timestamp (SDK) |
|
| App download began (Android only) |
|
| App download completed |
|
| Google Play install timestamp |
|
| Google Play first open timestamp |
|
| Postback time from advertiser |
|
| Time between click and install in seconds |
|
Attribution & tracking parameters
Parameter | Description | Example |
| Name of the MMP or SDK |
|
| SDK version |
|
| Attribution method |
|
| Attribution window in hours |
|
| Adjust device ID |
|
|
|
|
|
|
|
|
|
|
|
|
|
| Postback ID from advertiser |
|
| Deeplink URL |
|
| Custom partner parameters from SDK |
|
| Ad group name from tracker |
|
| Creative name from tracker |
|
| Whether the click/conversion was flagged as suspicious: |
|
| Whether the conversion is retargeted: |
|
| Whether this is the first time the event fired for this user: |
|
Session & other parameters
Parameter | Description | Example |
| Sessions recorded by current SDK version |
|
| Total lifetime sessions |
|
| Device timezone |
|
| Unique value for duplicate detection |
|
🔗 Sample Postback Link
https://track.yournetwork.swaarm-clients.com/postback?click_id=[Click ID macro for Advertiser]&event_id=[Advertiser Event ID/name Macro]&sale_amount=[Payout per conversion macro]&gaid=[Google Advertising ID macro]&idfa=[iOS advertising ID Macro]
Impression tracking
Impression tracking works the same way as click tracking - the same macros are supported. The key difference is that {id} represents the impression ID rather than the click ID.
⚠️ Publishers must include a unique impression ID in their impression tracking link so Swaarm can match the impression to a conversion.
🔗 Sample advertiser impression tracking URL:
All click macros listed above are supported on impression URLs. Postback parameters are the same as on the click level - see the Postback parameters section above →.
