This article is the reference for setting up tracking between Swaarm and your publishers. It covers the parameters publishers add to their tracking link and the macros Swaarm uses to send postback notifications back to publishers when a conversion occurs.
ℹ️ Looking for step-by-step setup instructions? See Create and configure a publisher →
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 parameters for the publisher tracking link
These are the parameters publishers add to their Swaarm tracking link.
⚠️ offer_id, pub_id, and pub_click_id are mandatory - without offer_id and pub_id the click cannot be redirected to the advertiser. Without pub_click_id Swaarm will send empty click id value, which will lead to the incorrect postback attribution at Publisher's side.
Core parameters
Parameter | Description | Example |
| Swaarm offer ID - mandatory |
|
| Swaarm publisher ID - mandatory |
|
| Publisher's own click ID - used to match postbacks back to the publisher |
|
| Publisher sub ID |
|
| Publisher sub sub ID |
|
| Recommendation / Smart Link ID |
|
| Swaarm Landing Page ID |
|
| Non-unique token generated by Swaarm for privacy-enabled attribution |
|
Traffic & placement parameters
Parameter | Description | Example |
| Publisher placement name or ID |
|
| Publisher app name or ID |
|
| App store ID of the ad placement |
|
| Publisher site ID |
|
| Publisher creative name or ID |
|
| Search term passed by the publisher |
|
| Publisher custom value 1 |
|
| Publisher custom value 2 |
|
| Publisher custom value 3 |
|
| Publisher custom value 4 |
|
| Publisher custom value 5 |
|
Device parameters
Parameter | Description | Example |
| iOS Advertising ID |
|
| Android Advertising ID |
|
| IP of the user device |
|
| User agent of the user device |
|
| Language of the user device (ISO codes) |
|
| Device model number |
|
| Device manufacturer name |
|
| Operating system |
|
| OS version |
|
Privacy-enabled attribution parameters
Only required for offers running privacy-enabled attribution.
Parameter | Description | Example |
| Publisher's own offer ID |
|
| Publisher's source ID |
|
ATT / iOS privacy parameters
Required for iOS campaigns where the advertiser's MMP requests ATT data.
Parameter | Description | Example |
| Identifier for Vendor |
|
| Traffic type |
|
| ATT authorisation status |
|
| Unix timestamp of ATT authorisation |
|
| Time in seconds the user took to respond to the ATT prompt |
|
| Detailed ATT authorisation status |
|
🔗 Sample publisher tracking link
https://{yourdomain}.trckswrm.com/click?offer_id=9876&pub_id=1234&pub_sub_id=[Publisher Sub ID macro]&pub_click_id=[Publisher click ID macro]&idfa=[Publisher IDFA macro]&gaid=[Publisher GAID macro]
Postback macros supported by Swaarm for publishers
These are the macros Swaarm uses when firing postbacks to publishers. The "Privacy-enabled" column indicates whether the macro is available when the conversion uses privacy-enabled attribution.
Core macros
Macro | Description | Example | Privacy-enabled |
| Publisher's own click ID |
| No |
| Swaarm unique postback ID |
| Yes |
| Network's own click ID |
| No |
| Publisher ID |
| Yes |
| Publisher sub ID |
| Yes (if passed by advertiser) |
| Publisher sub sub ID |
| No |
| Publisher original sub ID (for publisher groups) |
| Yes (if passed by advertiser) |
| Pea chain value passed by the publisher |
| Yes |
Payout macros
Macro | Description | Example | Privacy-enabled |
| Publisher payout in dollars |
| Yes |
| Publisher payout in dollars (up to 12 decimal places) |
| Yes |
| Publisher payout in cents |
| Yes |
| Publisher payout in cents (up to 12 decimal places) |
| Yes |
| Points earned by the rewarded user |
| Yes |
Offer & event macros
Macro | Description | Example | Privacy-enabled |
| Swaarm offer ID |
| Yes |
| Swaarm offer name |
| Yes |
| Swaarm event type ID |
| Yes |
| Swaarm event type name |
| Yes (if passed by advertiser) |
| Advertiser's event ID -use this if migrating from another tracking platform |
| Yes |
| Postback status |
| Yes |
Time macros
Macro | Description | Example | Privacy-enabled |
| Click time recorded by Swaarm |
| Yes (if passed by advertiser) |
| Click time in Unix timestamp |
| Yes (if passed by advertiser) |
| Postback event time |
| Yes (if passed by advertiser) |
| Postback time in timestamp format |
| Yes (if passed by advertiser) |
Device & user macros
Macro | Description | Example | Privacy-enabled |
| IDFA |
| No |
| GAID |
| No |
| User IP |
| No |
| User device user agent |
| No |
| User device language |
| No |
| User device OS |
| Yes (if passed by advertiser) |
| User country |
| Yes (if passed by advertiser) |
| User ISP |
| No |
Publisher placement macros
Macro | Description | Example | Privacy-enabled |
| Publisher site ID |
| No |
| Publisher app name or ID |
| No |
| Publisher app ID |
| No |
| Publisher creative name or ID |
| No |
| Publisher custom value 1 |
| No |
| Publisher custom value 2 |
| No |
| Publisher custom value 3 |
| No |
| Publisher custom value 4 |
| No |
| Publisher custom value 5 |
| No |
| Search term passed by the publisher |
| Not applicable |
Advertiser rejection macros
Macro | Description | Example | Privacy-enabled |
| Advertiser rejection reason |
| Yes (if passed by advertiser) |
| Advertiser rejection reason value |
| Yes (if passed by advertiser) |
| Advertiser rejection sub-reason |
| Yes (if passed by advertiser) |
| Advertiser tracker name |
| Yes |
| Total revenue generated by the user for this event, as passed by the advertiser in |
| Yes (if passed by advertiser) |
External ID macros
Macro | Description | Example | Privacy-enabled |
| Publisher's offer ID passed via click |
| Yes |
| Publisher's source ID passed via click |
| Yes |
Rewarded user macros
Macro | Description | Example | Privacy-enabled |
| Rewarded user ID |
| Yes |
| Rewarded user internal ID |
| Yes |
🔗 Sample publisher tracking link
ℹ️ Passing a value for default events - if your publisher requires a value in their event parameter for default events, use: #{offer.eventTypeId?:'1'} This passes 1 for default event conversions and the Swaarm event ID for in-app event conversions.
Impression tracking
Impression tracking works the same way as click tracking - the same parameters are supported. The key difference is the URL path uses /impression instead of /click.
🔗 Sample publisher impression tracking link
https://{yourdomain}.trckswrm.com/impression?offer_id=9876&pub_id=1234&pub_sub_id=[Publisher Sub ID macro]&id=[Publisher Impression ID macro]&idfa=[Publisher IDFA macro]&gaid=[Publisher GAID macro]
