Skip to main content

Adjust Integration with Swaarm

How to set up the attribution link and postback URLs for Adjust integration with Swaarm.

Overview

This article covers the attribution link template and postback URL setup for integrating Adjust with Swaarm. The advertiser using Adjust usually shares a 6-7 digit tracker and a 6-digit event token (if required) with you, which you use to generate the tracking link via the Adjust Partner Dashboard.

ℹ️


Attribution Link Setup

⚠️ Adjust requires postback URLs embedded in the tracking link to be encoded - otherwise the Adjust server might fail to read the parameters and tracking might not work correct. Use the Adjust Encoding Tool to generate your tracking URL.

Example: Tracking an Install and a Purchase event for an offer named "coolgame_iOS". The advertiser shared a tracker trck123 and an event token xy123z for the Purchase event.

Step 1 - Add Your Adjust Link

In the Adjust Encoding Tool, insert your tracker with the placeholders you want to pass additional information through:

https://app.adjust.com/trck123?campaign=coolgame_iOS&adgroup={publisher.id}_{publisher.subId}&creative={publisher.creative}&idfa={device.ids.idfa}&gps_adid={device.ids.gaid}&user_agent={user.encoded_ua}&tracker_limit=100000

Step 2 - Add Your Callback URLs

  • Event callback (for event 'Purchase' with token xy123z):

https://track.{yournetwork}.swaarm-clients.com/postback?click_id={id}&event_id=xy123z

⚠️ Replace {yournetwork} with your own Swaarm postback domain.

  • Install callback:

https://track.{yournetwork}.swaarm-clients.com/postback?click_id={id}&idfa={idfa}&gaid={gps_adid}&city={city}

⚠️ Replace {yournetwork} with your own Swaarm postback domain.

ℹ️ Use {adjust.installParameter} macro instead on install postback to reduce your tracking link length.

  • Rejected install callback:

https://track.{yournetwork}.swaarm-clients.com/postback?click_id={id}&status=rejected&idfa={idfa}&gaid={gps_adid}&city={city}&rejection_reason={rejection_reason}

⚠️ Replace {yournetwork} with your own Swaarm postback domain.

Step 3 - Use the Generated URL

Once all callbacks are added, Adjust generates a complete URL combining the tracker and all callback parameters. Copy this generated URL and use it as the offer tracking URL in Swaarm.

Final tracking link will look as this -

https://app.adjust.com/trck123?campaign=coolgame_iOS&adgroup={publisher.id}_{publisher.subId}&creative={publisher.creative}&idfa={device.ids.idfa}&gps_adid={device.ids.gaid}&user_agent={user.encoded_ua}&tracker_limit=100000&install_callback=https%3A%2F%2Ftrack.bestagency.swaarm-clients.com%2Fpostback%3Fclick_id%3D{id}%26idfa%3D%7Bidfa%7D%26gaid%3D%7Bgps_adid%7D%26city%3D%7Bcity%7D&rejected_install_callback=https%3A%2F%2Ftrack.bestagency.swaarm-clients.com%2Fpostback%3Fclick_id%3D{id}%26status%3Drejected%26idfa%3D%7Bidfa%7D%26gaid%3D%7Bgps_adid%7D%26city%3D%7Bcity%7D%26rejection_reason%3D%7Brejection_reason%7D&event_callback_xy123z=https%3A%2F%2Ftrack.bestagency.swaarm-clients.com%2Fpostback%3Fclick_id%3D{id}%26event_id%3Dxy123z

Event Setup

There are 2 ways to track events with Adjust, depending on how you want to manage event identifiers:

Option 1 - Use the Adjust event token

  • Set the Adv. EventType ID on the Swaarm event to the Adjust event token (e.g. xy123z)

  • In the postback, use the event_id parameter with the matching token value:

&event_callback_xy123z=https%3A%2F%2Ftrack.bestagency.swaarm-clients.com%2Fpostback%3Fclick_id%3D{id}%26event_id%3Dxy123z

Option 2 - Use the Swaarm event ID

  • Create the event in Swaarm and note its Swaarm-generated Event ID (e.g. 9864)

  • In the postback, use the our_event_type_id parameter with the Swaarm event ID as the value:

&event_callback_xy123z=https%3A%2F%2Ftrack.bestagency.swaarm-clients.com%2Fpostback%3Fclick_id%3D{id}%26our_event_type_id%3D9864

Option 3 - Multiple Events in One Postback (Reducing Link Length)

When an offer has a lot of events, adding a separate &event_callback_xxx=... parameter for each one makes the tracking link very long. Adjust supports combining multiple event tokens into a single callback parameter instead (event_callback_eventToken1_eventToken2_eventToken3=...), and Swaarm has matching macros to generate that automatically.

⚠️ Add Adjust event token in respective Adv EventType ID field when setting event in Swaarm. For example, event 'purchase', token 'xyz123':

Macros

Macro

What it expands to

{adjust.eventParameterName}

Just the parameter name, e.g. event_callback_xyz456_abc123_def789

{adjust.eventParameter}

The full parameter - name and postback URL together, ready to drop straight into the link

Use {adjust.eventParameter} when you want Swaarm to generate the entire multi-event callback for you. Use {adjust.eventParameterName} if you'd rather build the value part of the callback yourself.

Example

Say the offer has 2 events with Adv. EventType ID values xyz456, abc123, and def789, and your platform default postback domain is https://{yournetwork}.swaarm-clients.com/postback.

A tracking link like:

https://app.adjust.com/abc123?campaign={offer.id}&{adjust.eventParameter}

becomes:

https://app.adjust.com/abc123?campaign=1234&event_callback_xyz456_abc123_def789=https%3A%2F%2F{yournetwork}.swaarm-clients.com%2Fpostback%3Fclick_id%3D123%26event_id%3D%7Bevent%7D

⚠️ Replace {yournetwork} with your own Swaarm postback domain.

One parameter now covers all three events instead of three separate event_callback_xxx=... parameters.

ℹ️ Adjust's {event} macro (the Event token) is included automatically inside the generated postback URL - it's constant per event, so you can also use it to reference a specific event in your Adjust reports.

ℹ️ {adjust.eventParameterName} alone would expand to just event_callback_xyz456_abc123_def789, useful if you want to construct the callback value part manually rather than have Swaarm generate the whole thing.


Global Postback Setup (Technical Integrated Partners)

If you are a technically integrated partner with Adjust, you can share a postback template directly with Adjust so it's saved on their end, rather than configuring it per-tracker.

Global install postback (Android)

https%3A%2F%2Ftrack.{yournetwork}.swaarm-clients.com%2Fpostback%3Fclick_id%3D{id}%26gaid%3D%7Bgps_adid%7D%26city%3D%7Bcity%7D

Global install postback (iOS)

https%3A%2F%2Ftrack.{yournetwork}.swaarm-clients.com%2Fpostback%3Fclick_id%3D{id}%26idfa%3D%7Bidfa%7D%26city%3D%7Bcity%7D

In-app event postback (both OS)

http%3A%2F%2Ftrack.{yournetwork}.swaarm-clients.com%2Fpostback%3Fclick_id%3D{id}%26our_event_type_id%3D293

⚠️ Replace {yournetwork} with your own Swaarm postback domain.

For more details on adjusting your tracking URL further:


Passing Costs to Adjust

There are two ways to share your spend (payout) data with Adjust so the advertiser sees accurate cost figures in their Adjust dashboard.

Option 1 - Ad Spend Parameters in the Link

Add three parameters directly to your Adjust tracking link: cost_type, cost_amount, and cost_currency. Adjust records this as ad spend at the moment of click or impression, no separate integration or approval needed.

Example:

https://app.adjust.com/trck123?...&cost_type=cpi&cost_amount={offer.weGet}&cost_currency=usd

ℹ️ This is the simplest setup, but the value is static: it's locked in at the time of the engagement and won't update if the payout changes afterward. Good for a quick setup, less precise for offers with frequently changing payouts.

Option 2 - Ad Spend Push API

For more accurate, per-engagement cost reporting via API rather than a static link parameter, use Adjust's Partner Ad Spend Push API. This requires your network to first be set up as an integrated ad spend partner with Adjust (contact wizards@adjust.com), then configuring the Adjust Upload Config on the Swaarm offer.

Did this answer your question?