Article

S2S – Branch

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.

Requirements Your program’s URL format must be set to Server-to-Server (S2S), under Configuration then Global settings. Your app must embed the Branch SDK, and you need admin access to your Branch account.

How it works

  1. The visitor clicks an Affilae tracking link.
  2. Affilae records the click and sends the visitor to your Branch link, with the click ID.
  3. Branch does the attribution, not Affilae.
  4. For every event attributed to Affilae, Branch sends a postback to Affilae with the click ID.
  5. 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).

  1. In Branch, open Configuration > Ad Partners (legacy dashboard: Ads > Partner Management).
  2. Search for Affilae and open its page.
  3. Click Enable, and accept the terms if Branch asks you to.

Step 2, create the Branch link

  1. In Branch, create an advertising link: Create Link > Ad Link, then select the Affilae partner.
  2. Set the $fallback_url web fallback to an address of your website, your homepage for instance.
  3. Check that the link carries the parameters below, then copy it.

The link looks like this:

https://your-app.app.link/XXXXXX?$3p=a_affilae&~click_id={ClickID}&~campaign=Affilae&$fallback_url=https://www.your-website.com/

The parameters to keep

Parameter What it does
$3pIdentifies Affilae as the advertising partner. Branch adds it when the link is created for Affilae.
~click_idReceives the Affilae click ID. Keep the {ClickID} value as is: Affilae fills it in on every click.
$fallback_urlWeb page for visitors who do not have the app. Affilae puts the page chosen by the affiliate there.
~campaignOptional. Names the campaign in Branch, which passes it as utm_campaign on web redirects.
Tip You can also use the {affiliateTrackingId}, {affiliateName}, {affiliateGroup}, {programName}, {programId}, {month}, {year} and {adId} tokens in the link, for instance ~secondary_publisher={affiliateTrackingId} to see the affiliate in Branch. Affilae fills them in on every click.

Step 3, send the conversions to Affilae

Branch passes conversions to Affilae through a postback, one per event you want to reward.

  1. 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.
  2. In Branch, on the Affilae partner page, open Postback Config and click Add New Postback.
  3. Pick the event, PURCHASE for instance.
  4. 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.
  5. Leave Send all events off: Branch then only sends the events attributed to Affilae.
https://lb.affilae.com/?key=YOUR_AFFILAE_KEY&cids=${(last_attributed_touch_data.~click_id)!}&id=${(event_data.transaction_id)!}&amount=${(event_data.revenue)!}&currency=${(event_data.currency)!}&voucher=${(event_data.coupon)!}
Parameter What it does
keyThe key of the Affilae commission rule
cidsThe Affilae click ID, sent back by Branch
idThe order number
amountThe sale amount, in the order’s currency
currencyThe order’s currency, as an ISO code (EUR, for instance)
voucherThe voucher code used, optional
The amount and its currency go together Use event_data.revenue with event_data.currency. Do not pair revenue_in_usd with the order’s currency: amounts would be wrong for every sale that is not in dollars.
A unique order number Branch may send the same postback twice. Affilae counts one conversion per order number and per rule: always send the real order number in id.

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

  1. In Affilae, open Configuration.
  2. Open the Global settings section.
  3. Open URL tracking management.
  4. Check that the program’s URL format is set to Server-to-Server (S2S).
  5. Turn on Redirect clicks through an attribution partner (advanced). The next two fields only appear once it is on.
  6. Paste your Branch link into Partner redirection URL.
  7. Enter $fallback_url in Landing page query parameter.
Both fields are required The first says where to go through, the second which parameter Affilae puts the real landing page in. With only one of them, links do not go through Branch, and in-app sales are not attributed to your affiliates.
Your affiliates only use Affilae links Never give your Branch link to your affiliates: paste it into your program configuration, and the Link builder adds it automatically to their tracked links. Your affiliates create their links in Affilae with the address of a page of your website, never with a Branch link.

Step 5, the final test

Branch measures one install per device, except on test devices. Prepare your phone before testing.

Register your phone as a test device Add it in Branch (Test devices) with its advertising ID (IDFA on iPhone, GAID on Android), which the Branch Device ID Finder app shows. After each install test, reset the device in Branch (Reset or Refresh, depending on your dashboard): otherwise the next install is counted as a reinstall.
On iPhone, allow tracking before you test When the user declines tracking, Branch does not attribute installs coming from a web link to a partner. On the test device, open Settings > Privacy & Security > Tracking, turn on Allow Apps to Request to Track, then accept your app’s tracking request.
  1. Uninstall the app if it is on the phone.
  2. Generate a test link in the Affilae Link builder, for one of your partnerships, and open it on the phone.
  3. Install the app, then open it.
  4. Trigger a configured event, a purchase for instance.
  5. In Branch, check that the postback to Affilae was sent (Liveview, or the Postback Testing tab of the Affilae page).
  6. Finally, check that the conversion reaches Affilae, with its amount.
Tip Do not test the install only. Trigger at least one purchase: it is the purchase postback, with the rule’s key, that decides the commission.

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

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.

Need help?

Stay up to date with the latest trends in affiliate marketing and never miss any of our articles.

Contact Us