Skip to main content

Publisher Tracking Details

A complete reference for publisher tracking in Swaarm - click parameters for the tracking link, postback macros, ATT parameters, impression tracking, and sample URLs

Updated over a week ago

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:

  1. A user clicks the publisher's ad and is redirected through Swaarm

  2. Swaarm records the click and assigns a unique click ID

  3. Swaarm forwards the user to the advertiser's offer (via their MMP or direct link)

  4. The advertiser's platform / MMP stores the Swaarm click ID

  5. When the user converts (installs, purchases, etc.), the advertiser platform / MMP fires a postback to Swaarm containing the click ID

  6. 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

offer_id

Swaarm offer ID - mandatory

12345

pub_id

Swaarm publisher ID - mandatory

1234

pub_click_id

Publisher's own click ID - used to match postbacks back to the publisher

0a81ad386f991aef1c191dfd60cc

pub_sub_id

Publisher sub ID

abc123

pub_sub_sub_id

Publisher sub sub ID

abc123_def

rec_link_id

Recommendation / Smart Link ID

256

lp_id

Swaarm Landing Page ID

65432

pea_chain

Non-unique token generated by Swaarm for privacy-enabled attribution

e6UKM7lLUwlwAWXUyNO25TCY

Traffic & placement parameters

Parameter

Description

Example

placement

Publisher placement name or ID

abc_game123

app

Publisher app name or ID

coolgame_app

app_store_id

App store ID of the ad placement

343204456

site

Publisher site ID

abc_game123

creative

Publisher creative name or ID

coolgame_320x50

term

Search term passed by the publisher

Electric Vehicle

unique1

Publisher custom value 1

custom1

unique2

Publisher custom value 2

custom2

unique3

Publisher custom value 3

custom3

unique4

Publisher custom value 4

custom4

unique5

Publisher custom value 5

custom5

Device parameters

Parameter

Description

Example

idfa

iOS Advertising ID

4D6F-1226-9C60-0050E4C04654

gaid

Android Advertising ID

GR56-1886-9D60-005776FC0465

user_ip

IP of the user device

102.109.100.2

user_ua

User agent of the user device

Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_1 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.0 Mobile/14E304 Safari/602.1

user_language

Language of the user device (ISO codes)

EN

user_model

Device model number

GM-9621

user_make

Device manufacturer name

Samsung

user_os

Operating system

Android

user_os_version

OS version

9.2.2

Privacy-enabled attribution parameters

Only required for offers running privacy-enabled attribution.

Parameter

Description

Example

ext_offer_id

Publisher's own offer ID

12345

ext_pub_id / ext_publisher_id

Publisher's source ID

123

ATT / iOS privacy parameters

Required for iOS campaigns where the advertiser's MMP requests ATT data.

Parameter

Description

Example

idfv

Identifier for Vendor

3K0XXXXX-83XX-HEXX-KIXX-29KH83XXXXXX

traffic_type

Traffic type

in_app,

mob_web,

desktop_web

att

ATT authorisation status

0 = not authorised,

1 = authorised, unpopulated for mobile web

att_time

Unix timestamp of ATT authorisation

1622163110

att_duration

Time in seconds the user took to respond to the ATT prompt

59175525

att_detail

Detailed ATT authorisation status

Authorization,

Denied,

Restricted, notDetermined

🔗 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

#{click.publisher.clickId}

Publisher's own click ID

ff49c078-3512-11e9

No

#{id}

Swaarm unique postback ID

Ne_tpNr2ZAAAAAF-spRETw

Yes

#{click.id}

Network's own click ID

ATALzPEAAAFpCxU2EAAA

No

#{click.publisher.id}

Publisher ID

1235

Yes

#{click.publisher.subId}

Publisher sub ID

10762_6eae4874d9c3

Yes

(if passed by advertiser)

#{click.publisher.subSubId}

Publisher sub sub ID

10762_6eae4874d9c3_abc

No

#{click.publisher.originalSubId!=null ?click.publisher.originalSubId :click.publisher.subId }

Publisher original sub ID (for publisher groups)

10762_6eae4874d9c3

Yes

(if passed by advertiser)

#{peaChain}

Pea chain value passed by the publisher

e6UKM7lLUwlwAWXUyNO25TCY

Yes

Payout macros

Macro

Description

Example

Privacy-enabled

#{payout.theyGetInDollars}

Publisher payout in dollars

1.7

Yes

#{payout.theyGetInDollarsExact}

Publisher payout in dollars (up to 12 decimal places)

1.701234

Yes

#{payout.theyGetInCents}

Publisher payout in cents

170

Yes

#{payout.theyGetInCentsExact}

Publisher payout in cents (up to 12 decimal places)

170.1234

Yes

#{payout.theyGetPoints}

Points earned by the rewarded user

123.45

Yes

Offer & event macros

Macro

Description

Example

Privacy-enabled

#{offer.offerId}

Swaarm offer ID

12345

Yes

#{offer.name}

Swaarm offer name

Cool Game

Yes

#{offer.eventTypeId}

Swaarm event type ID

1234

Yes

#{eventType.name}

Swaarm event type name

Registration (empty for default event)

Yes (if passed by advertiser)

#{eventType.advertiserEventTypeId}

Advertiser's event ID -use this if migrating from another tracking platform

Purchase123

Yes

#{status.state}

Postback status

APPROVED / REJECTED

Yes

Time macros

Macro

Description

Example

Privacy-enabled

#{click.time}

Click time recorded by Swaarm

2019-06-04T21:00:56

Yes (if passed by advertiser)

#{click.unixTime}

Click time in Unix timestamp

1576857465

Yes (if passed by advertiser)

#{time}

Postback event time

2019-06-27 14:44:47

Yes (if passed by advertiser)

#{dateTime.conversionTimestamp}

Postback time in timestamp format

16456875856

Yes (if passed by advertiser)

Device & user macros

Macro

Description

Example

Privacy-enabled

#{click.device.idfa}

IDFA

4D6F-1226-9C60-0050E4C04654

No

#{click.device.gaid}

GAID

4R45-1226-D565-0050E4C04654

No

#{click.user.connection.ip}

User IP

102.192.135.251

No

#{click.user.device.ua}

User device user agent

Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_1 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.0 Mobile/14E304 Safari/602.1

No

#{click.user.device.language}

User device language

EN

No

#{click.user.device.os}

User device OS

iOS

Yes (if passed by advertiser)

#{click.user.geo.country}

User country

US

Yes (if passed by advertiser)

#{user.connection.isp}

User ISP

Verizon Internet

No

Publisher placement macros

Macro

Description

Example

Privacy-enabled

#{click.publisher.site}

Publisher site ID

abc_game123

No

#{click.publisher.app}

Publisher app name or ID

coolgame_app

No

#{click.publisher.appId}

Publisher app ID

343204456

No

#{click.publisher.creative}

Publisher creative name or ID

coolgame_320x50

No

#{click.publisher.unique1}

Publisher custom value 1

custom1

No

#{click.publisher.unique2}

Publisher custom value 2

custom2

No

#{click.publisher.unique3}

Publisher custom value 3

custom3

No

#{click.publisher.unique4}

Publisher custom value 4

custom4

No

#{click.publisher.unique5}

Publisher custom value 5

custom5

No

#{click.publisher.term}

Search term passed by the publisher

Electric Vehicle

Not applicable

Advertiser rejection macros

Macro

Description

Example

Privacy-enabled

#{attributionPartner.rejectionReason}

Advertiser rejection reason

ctit_anomalies

Yes (if passed by advertiser)

#{attributionPartner.rejectionReasonValue}

Advertiser rejection reason value

123434123

Yes (if passed by advertiser)

#{attributionPartner.rejectionReasonSubValue}

Advertiser rejection sub-reason

bot_traffic

Yes (if passed by advertiser)

#{attributionPartner.trackerName}

Advertiser tracker name

appsflyer

Yes

#{attributionPartner.aggregatedEventValue}

Total revenue generated by the user for this event, as passed by the advertiser in aggregated_event_value

49.99

Yes (if passed by advertiser)

External ID macros

Macro

Description

Example

Privacy-enabled

#{ext.offerId}

Publisher's offer ID passed via click

12345

Yes

#{ext.publisherId}

Publisher's source ID passed via click

432

Yes

Rewarded user macros

Macro

Description

Example

Privacy-enabled

#{rewardedUser.id}

Rewarded user ID

12345

Yes

#{rewardedUser.internalId}

Rewarded user internal ID

123

Yes

ℹ️ 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]

Did this answer your question?