Macros tell Aftrad what to put in each parameter of an affiliate's tracking links (click and impression). Set your affiliate's tracker macros once (for example, their click ID macro) and every tracking link you copy for that affiliate is ready to use, with nothing to edit by hand. It's also what makes postbacks work: Aftrad returns the affiliate's click ID with each conversion.
Go to Performance → Affiliates, edit the affiliate and open GENERAL → Macros.
How it works
Each field is a parameter of the tracking link. What you type in the field is the value Aftrad adds to that parameter.
Fill a field to add its parameter to the affiliate's tracking links.
Leave it empty and the parameter is not added.
New affiliates start with
{REPLACE}in Click ID, Source and Subsource.Type the macro of your affiliate's tracker (for example
{clickid}for Affise), so their platform fills in the real value on every click.
For example, with Click ID = {clickid}, Source = {pid} and Subsource = {sub1}, the tracking link you copy for this affiliate looks like this:
https://yourdomain.com/track/direct?publisher_id=1&offer_id=7&click_id={clickid}&source={pid}&sub_source={sub1}
Part of the link | What it is |
| The affiliate's Default traffic domain. |
| The affiliate ID and the offer ID. Always included. |
| The parameters filled in the affiliate's Macros. |
Note: {REPLACE} is a placeholder: the affiliate must replace it with their own macro before using the link. Set the right macro here and they won't need to.
Available parameters
Field | Parameter in the link | What to send |
Click ID |
| The affiliate's unique click ID. Always set it: Aftrad returns it in the affiliate postback. |
Aggregate ID |
| An extra ID the affiliate wants to group clicks by. |
Source |
| The affiliate's traffic source (for example, their own publisher ID). |
Subsource |
| The affiliate's sub-source (for example, their publisher's sub ID). |
Placement |
| Where the ad was shown. |
App Name |
| Name of the app where the ad was shown. |
App ID |
| ID of the app where the ad was shown. |
Site |
| Website where the ad was shown. |
Creative |
| The creative (banner, video…) that was clicked. |
IDFA |
| iOS advertising ID. |
GAID |
| Google (Android) advertising ID. |
IDFV |
| iOS identifier for vendors. |
ASID |
| Android App Set ID. |
User IP |
| IP address of the user. |
User agent |
| User agent of the user's browser or device. |
User language |
| Language of the user's device. |
Custom 1 … Custom 8 |
| Any other value the affiliate wants to pass. |
Click Save to apply the changes. From then on, every tracking link and impression tracking link you copy for this affiliate includes these macros (offer → AFFILIATES → ⋯ → Copy Offer tracking link).
Click ID and postbacks
When a conversion happens, Aftrad sends the value it received in click_id back to the affiliate with the {affiliate_click_id} macro of the Affiliate postback. That's how the affiliate's tracker matches the conversion with its own click. Without a Click ID macro, the affiliate can't attribute conversions.
Recommended macros for common trackers
Many affiliates use a tracking platform. Use these macros in the affiliate's Macros depending on their tracker. Type them exactly as shown: braces, # signs and case included.
Tracker | Click ID | Source | Subsource |
Swaarm |
|
|
|
Affise |
|
|
|
TUNE (HasOffers) |
|
|
|
CAKE |
|
|
|
Trackier |
|
|
|
Offer18 |
|
|
|
In each case, Click ID is the tracker's own click ID, Source is the ID of the tracker's publisher and Subsource is that publisher's sub ID.
Note: Trackers change their macros from time to time. If in doubt, ask your affiliate to confirm them, and send a test click before going live (see Test link with affiliates).
Optional device and user macros
If your affiliate passes device or user data, these are the macros documented by each tracker:
Tracker | IDFA | GAID | User IP | User agent |
Swaarm |
|
|
|
|
Affise | — | — |
|
|
TUNE (HasOffers) |
|
| — | — |
Trackier |
|
|
|
|
Offer18 |
|
|
|
|
The affiliate's postback URL
To report conversions back to the tracker, your affiliate gives you their postback URL. Paste it in the affiliate's GENERAL → Postbacks and fill their click ID and payout parameters with Aftrad macros:
Tracker | Click ID parameter | Payout parameter | Example |
Swaarm |
|
|
|
Affise |
|
|
|
TUNE (HasOffers) |
|
|
|
CAKE |
|
|
|
Trackier |
|
|
|
Offer18 |
|
|
|
Note: Keep the rest of the affiliate's URL as they gave it (domain, offer or account IDs, security token, goal). Only replace their click ID and payout placeholders.

