S2S – Branch
Discover the most-read articles
Branch is a mobile attribution platform. Combined with Affilae’s Server-to-Server tracking, it lets you track the installs and in-app events your affiliates generate. Affilae records the click, Branch does the attribution, then sends the conversions back to Affilae.
How it works
- The visitor clicks an Affilae tracking link.
- Affilae records the click and sends the visitor to your Branch link, with the click ID.
- Branch does the attribution, not Affilae.
- For every event attributed to Affilae, Branch sends a postback to Affilae with the click ID.
- Affilae matches the conversion to the click and computes the commission.
Step 1, enable Affilae in Branch
Affilae is one of Branch’s advertising partners (Ad Partners).
- In Branch, open Configuration > Ad Partners (legacy dashboard: Ads > Partner Management).
- Search for Affilae and open its page.
- Click Enable, and accept the terms if Branch asks you to.
Step 2, create the Branch link
- In Branch, create an advertising link: Create Link > Ad Link, then select the Affilae partner.
- Set the $fallback_url web fallback to an address of your website, your homepage for instance.
- Check that the link carries the parameters below, then copy it.
The link looks like this:
The parameters to keep
| Parameter | What it does |
|---|---|
| $3p | Identifies Affilae as the advertising partner. Branch adds it when the link is created for Affilae. |
| ~click_id | Receives the Affilae click ID. Keep the {ClickID} value as is: Affilae fills it in on every click. |
| $fallback_url | Web page for visitors who do not have the app. Affilae puts the page chosen by the affiliate there. |
| ~campaign | Optional. Names the campaign in Branch, which passes it as utm_campaign on web redirects. |
Step 3, send the conversions to Affilae
Branch passes conversions to Affilae through a postback, one per event you want to reward.
- In Affilae, pick the commission rule for app sales and note its Key. We recommend a rule dedicated to the app, separate from your website rules.
- In Branch, on the Affilae partner page, open Postback Config and click Add New Postback.
- Pick the event, PURCHASE for instance.
- If Branch asks for a postback URL, or to check the one it suggests, use the address below and replace YOUR_AFFILAE_KEY with the rule’s key.
- Leave Send all events off: Branch then only sends the events attributed to Affilae.
| Parameter | What it does |
|---|---|
| key | The key of the Affilae commission rule |
| cids | The Affilae click ID, sent back by Branch |
| id | The order number |
| amount | The sale amount, in the order’s currency |
| currency | The order’s currency, as an ISO code (EUR, for instance) |
| voucher | The voucher code used, optional |
The attribution window
In Branch, the click to conversion window sets how long after a click a conversion can still be attributed to it. Set it to the same length as the Tracking duration (in days) of your Affilae rule, in the Attribution windows tab of the Affilae page. If Branch attributes a sale to a click older than that, Affilae cannot credit it to the affiliate.
Step 4, configure Affilae
- In Affilae, open Configuration.
- Open the Global settings section.
- Open URL tracking management.
- Check that the program’s URL format is set to Server-to-Server (S2S).
- Turn on Redirect clicks through an attribution partner (advanced). The next two fields only appear once it is on.
- Paste your Branch link into Partner redirection URL.
- Enter $fallback_url in Landing page query parameter.
Step 5, the final test
Branch measures one install per device, except on test devices. Prepare your phone before testing.
- Uninstall the app if it is on the phone.
- Generate a test link in the Affilae Link builder, for one of your partnerships, and open it on the phone.
- Install the app, then open it.
- Trigger a configured event, a purchase for instance.
- In Branch, check that the postback to Affilae was sent (Liveview, or the Postback Testing tab of the Affilae page).
- Finally, check that the conversion reaches Affilae, with its amount.
Key points
- The Affilae program must be in S2S.
- Affilae is enabled in Branch, under Ad Partners.
- The Branch link carries $3p=a_affilae, ~click_id={ClickID} and $fallback_url.
- One postback per rewarded event, with cids, the order number, and the amount in the order’s currency.
- Branch’s click to conversion window matches the rule’s Tracking duration.
- The Branch link is pasted into the program configuration, never given to affiliates.
- Testing is done on a Branch test device, on iPhone with tracking allowed.
Related articles
- S2S, Server-to-Server
- S2S – Appsflyer
- Affilae tracking fundamentals
- Testing click and conversion tracking
- All available integrations
Frequently asked questions
Voir plus de questions reponses
S2S switches your links to redirection and validates the conversion server side. That is what lets Branch send conversions to Affilae. Without that setting, the integration cannot work.
In Affilae, open Configuration, Tracking tab, expand Integration via an Affilae plugin and pick the rule in Rules and currencies: its Key appears.
$3p=a_affilae, ~click_id={ClickID} and $fallback_url. Without ~click_id, Branch cannot send the click ID back, and the conversion cannot be credited to the affiliate.
No. Paste it into your program configuration: the Link builder adds it automatically to your affiliates’ tracked links. A Branch link shared as is, or inserted by hand into an Affilae link, may not record clicks and conversions.
In this order: that the click comes from a link generated by Affilae, that the postback does carry cids, that the sale happens within the rule’s Tracking duration, and that the app rule is assigned to the affiliate’s group.
No. Affilae counts one conversion per order number and per rule. Always send the real order number in id.
The sale amount in the order’s currency, with a dot as decimal separator (26.10, for instance): event_data.revenue with event_data.currency.