Skip to main content

Advertiser - Postback URL for Advertisers

How to get the postback URL for one advertiser

J
Written by Jorge Rubia

For Aftrad to record a conversion, the Advertiser must notify Aftrad each time one happens on their side. They do it by calling the Postback URL, passing back the click ID that Aftrad sent them in the original click.


How the click ID reaches the Advertiser

When a user clicks an Affiliate's link, Aftrad redirects them to the Offer's Tracking URL. The {click_id} macro in that URL is replaced with the unique click ID, so the Advertiser receives it and can send it back in the postback.

For mobile traffic where attribution can be probabilistic, also add the {aggregated_id} macro to the Tracking URL. See Create an Offer – Basic setup.


Finding the Postback URL

Go to Home → Advertisers, open the Advertiser and click the Postback URL tab.

  • Domains Available — the event domain the Postback URL is built on. If more than one domain is available for this Advertiser, choose it here.

  • Postback URL — click the copy icon and share the URL with the Advertiser, so they can configure their platform to call it on each conversion.

Below the URL, the parameter table lists every parameter Aftrad can receive. Turn a parameter on in the Actions column and it's added to the Postback URL straight away.


Postback URL parameters

Always required

  • click_id — the click ID Aftrad sent to the Advertiser through the {click_id} macro of the Offer's Tracking URL. It's how Aftrad attributes the conversion to the right Offer and Affiliate.

⚠️ Exception: for mobile traffic, where attribution can be probabilistic, the conversion can be attributed with the click ID received in aggregated_id instead. The Advertiser receives this value through the {aggregated_id} macro of the Offer's Tracking URL.

Included by default

  • aggregated_id — see the exception above.

  • event_parameter — the name of the event in the Advertiser's platform (e.g. purchase, install, registration). It must match an event configured in the Offer's Payouts & Events.

  • payout — the amount the Advertiser pays for this conversion. Whether it's used depends on Payout in post back in the Offer's payout rules.

Optional

  • advertiser_id — the ID of the Advertiser, already filled in. It doesn't affect whether a postback is accepted, but it tells you which Advertiser sent it — useful to find the source of malformed postbacks.

  • advertiser_click_id — the Advertiser's own internal click ID. It isn't used for attribution, but you can filter by it and see it as a column in Tools → Advertiser Events. See Advertiser click ID in the Postback URL.

  • custom_amount_1, custom_amount_2, custom_count_1, custom_count_2 — informational values shown in Stats. See Advertiser Postback URL – Custom parameters.

AppsFlyer parameters

For Advertisers that use AppsFlyer:

  • af_platform

  • is_rejected — when you turn it on, three more parameters are added to the table and to the URL: blocked_reason, blocked_sub_reason and blocked_reason_value. While is_rejected is off, they stay hidden.


Secure token

Secure tokens let you verify that each postback really comes from the Advertiser. In the Secure tokens section of the same tab, click Generate to create a token. A securetoken parameter is then added to the Postback URL, and the Advertiser must send it in every postback.

  • Require secure token — when it's on, postbacks from this Advertiser that don't include a valid active token are rejected. Turn it on only once the Advertiser is already sending the token.

  • You can have more than one active token, and postbacks with any of them are accepted. Only one is the default — the one marked with a yellow star — and that's the token included in the Postback URL.

To change the token without losing conversions:

  1. Generate a new token. You now have two active tokens: the old one and the new one.

  2. Set the new token as default (click its star) and send the updated Postback URL to the Advertiser.

  3. While the Advertiser updates their setup, postbacks with either token are accepted.

  4. When the Advertiser confirms they no longer use the old token, revoke it. From then on, postbacks with the old token are rejected.

If you revoke the default token, another active token is automatically promoted to default.


Tracker macros reference

If the Advertiser uses one of these platforms as their tracker, here are ready-to-use Postback URL templates. The values in braces are the tracker's own macros: the tracker replaces them with the click_id or aggregated_id it received from Aftrad, the event name and the payout. Replace yournetwork-advertiser-postback.com with your Postback URL domain.

Affise

https://yournetwork-advertiser-postback.com/api/v1/events?click_id={sub1}&aggregated_id={transactionid}&event_parameter={goal}&payout={sum}

Offer18

https://yournetwork-advertiser-postback.com/api/v1/events?click_id={aff_click_id}&aggregated_id=&event_parameter=&payout={payout}

Swaarm

https://yournetwork-advertiser-postback.com/api/v1/events?click_id=#{click.publisher.clickId}&aggregated_id=#{click.publisher.unique1}&event_parameter=#{eventType.name}&payout=#{payout.theyGetInDollars}

Trackier

https://yournetwork-advertiser-postback.com/api/v1/events?click_id={click_id}&aggregated_id={txn_id}&event_parameter={conversion_id}&payout={payout}

Tune / HasOffers

https://yournetwork-advertiser-postback.com/api/v1/events?click_id={aff_sub}&aggregated_id={transaction_id}&event_parameter={goal}&payout={amount}

💡 Tip: don't see your tracker here? The pattern is always the same: map your tracker's macros to click_id (and aggregated_id if you use it), and optionally to event_parameter and payout.


Related articles

Did this answer your question?