Article

S2S – Appsflyer

AppsFlyer is a mobile attribution platform. Paired with Affilae Server-to-Server tracking, it lets you track installs and in-app events generated by your affiliates. Affilae collects the click, AppsFlyer 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. That setting switches tracking links to redirection and validates the conversion server side. You also need administrator access to your AppsFlyer account.

How it works

  1. The visitor clicks an Affilae tracking link.
  2. The click is passed to AppsFlyer through the attribution link.
  3. AppsFlyer performs the attribution, not Affilae.
  4. AppsFlyer automatically sends the configured conversions and events to Affilae.
  5. Affilae picks up the data it needs to compute commissions.

Step 1, configure AppsFlyer

Start by adding Affilae as a partner.

  1. In AppsFlyer, open the Integrated partners section.
  2. Search for Affilae.
  3. Add Affilae as a partner.
  4. Configure the partner for the apps concerned.
Searching for Affilae in the AppsFlyer partner list
Affilae in the AppsFlyer integrated partner list.

Configure each app, iOS and Android

The setup is done app by app. For each one:

  1. Open the app’s general settings.
  2. Add an Affilae Key.
  3. Check that this key is the one used for the events you want to track.

The Affilae Key maps AppsFlyer events onto Affilae tracking. Under General settings, that value is optional: you can leave it empty or enter none. What really matters is the link between your events and the Affilae Key.

Set up the events

  1. List the events you want to track: install, purchase, or any other useful event.
  2. Map each event to the right Affilae Key.
  3. Check that those events are enabled for the Affilae partner, and that In-app event postbacks is turned on.
Do not narrow the postback source On postbacks, the for users from menu should stay on the widest option, All media sources, including organic. Narrowing it to this partner only limits the data sent to Affilae, and costs you conversions.

Step 2, get the OneLink

  1. In AppsFlyer, open Attribution Link.
  2. Select or create the OneLink matching your app.
  3. Check its configuration.
  4. Copy the attribution link it generates.
Integration tab of the Affilae partner in AppsFlyer
The Affilae partner Integration tab: the partner activated, the Key field left empty, and postbacks set to All media sources, including organic.

The link looks like this:

pid=affilae2_int&af_siteid={affiliateId}&af_c_id={programId}&af_click_lookback=7d&clickid={ClickID}

The parameters to keep

Parameter What it does
pidIdentifies the AppsFlyer media source
af_siteidIdentifies the affiliate
af_c_idIdentifies the program
clickidIdentifies the click uniquely
af_click_lookbackSets the post click attribution window
AppsFlyer Attribution link screen, OneLink type selected
The Attribution link screen: the OneLink type selected, and the link parameters below.

The af_click_lookback window

This parameter sets how long after the click AppsFlyer can still credit an install to it. The default is 7 days, and it is configurable in AppsFlyer: accepted values currently range from 1 to 30 days.

Pick a duration that matches your attribution strategy: a long window credits more conversions to your affiliates, a short one limits them to quick installs.

OneLink and deep linking

If your program has no mobile app, none of this concerns you. As soon as an app is involved, AppsFlyer requires a universal link, the OneLink, able to handle iOS, Android and a web fallback on its own.

The OneLink adapts the journey to the visitor’s situation:

  • on desktop;
  • on mobile without the app installed: off to the store, or to your website, depending on the template chosen;
  • on mobile with the app installed: it opens straight away.

Deep linking goes further: instead of simply opening the app, it sends the visitor to a specific page or piece of content inside it. The parameters driving this are deep_link_value, af_ios_url, af_android_url and af_web_dp, and they are declared in the landing page parameters, in the next step.

To check in AppsFlyer The OneLink Template must be properly configured for the iOS, Android and web destinations matching the journey you want. An incomplete template gives you a link that works on one platform and not the other.

Retargeting, only when it really is retargeting

If the link is used for a retargeting campaign, the OneLink must carry this parameter:

is_retargeting=true

It tells AppsFlyer the link belongs to a retargeting campaign. Do not add it to every link by default: keep it for the campaigns concerned.

Step 3, 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 indeed Server-to-Server (S2S).
  5. Turn on Redirect clicks through an attribution partner (advanced). The two fields below only appear afterwards.
  6. Paste the AppsFlyer OneLink into Partner redirection URL.
  7. Fill in the Landing page query parameter with the destination parameters, separated by commas.
Both fields are required, not just the first one The application says so in the option’s own hint: both fields below are required for this to work. The first one says which way to go, the second says which keys Affilae must inject the real destination into. With only one of the two, the visitor lands on the AppsFlyer link with no idea where to go next.
URL tracking management section configured for AppsFlyer, English interface
The URL tracking management section configured for AppsFlyer: the option turned on, the OneLink in Partner redirection URL, and the four destination parameters in Landing page query parameter.

This option exists for exactly this case: the application’s hint names mobile attribution platforms, AppsFlyer among them.

Tip In the OneLink, replace hard coded values with tokens: Affilae fills them in on every click. The accepted tokens are {affiliateName}, {affiliateGroup}, {affiliateTrackingId}, {programName}, {programId}, {month}, {year} and {adId}. Without them, every click comes back with the same value, and per affiliate attribution becomes impossible.

Step 4, the final test

Before testing, check these four settings in AppsFlyer. They come up again and again in setups that do not work.

  • Advanced Privacy: must be disabled.
  • Re-engagement: must be enabled.
  • Deep link: must be ticked, and actually configured.
  • Postback source: the for users from menu on All media sources, including organic.
On iPhone, allow tracking before you test An iPhone refuses tracking by default, and your test will never come through. On the test device, open Settings > Privacy & Security > Tracking, then turn on Allow Apps to Request to Track. This is a phone setting, neither an Affilae nor an AppsFlyer one.
  1. Run a test click on mobile, using an Affilae tracking link.
  2. Check that AppsFlyer receives the click.
  3. Install the app if needed.
  4. Trigger a configured event, a purchase for instance.
  5. Check that the event shows up in AppsFlyer.
  6. Finally, check that the data reaches Affilae.
Tip Do not test the install only. Trigger at least one purchase event, because it is the match between the event and the Affilae Key that decides the commission.

Key points

  • The Affilae program must be in S2S, therefore on redirection links.
  • AppsFlyer does the attribution and sends the conversions back to Affilae.
  • The setup is done for each app, iOS and Android.
  • The Affilae Key must be mapped to the events you track.
  • The OneLink must be configured before being pasted into Affilae.
  • The pid, af_siteid, af_c_id and clickid parameters must stay in the link.
  • af_click_lookback ranges from 1 to 30 days, 7 by default.
  • Deep linking is handled in the OneLink Template.
  • is_retargeting=true is only for retargeting links.
  • The test must cover the click, the install and an in-app event.

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 AppsFlyer send conversions to Affilae automatically. Without that setting, the integration cannot work.

In AppsFlyer, open Attribution Link, then take the link matching the OneLink or Template used for your app.

Check the ones identifying the source, the affiliate, the program and the click: pid, af_siteid, af_c_id and clickid. The af_click_lookback parameter also sets the post click attribution window.

It depends on af_click_lookback. The window is 7 days by default, and it is configurable in AppsFlyer between 1 and 30 days. Past that duration, the install is no longer tied to the click.

It maps AppsFlyer events onto Affilae tracking. It is set app by app, and must be used with the events you want to pass on. Under General settings it is optional: you can leave it empty or enter none.

Yes. The setup is done app by app: each one has its own configuration and its own events.

Check that you filled in both fields, not just the first one. The application’s hint is explicit: the partner redirection URL and the landing page query parameter are both required. Also check that Redirect clicks through an attribution partner (advanced) is actually turned on.

In this order: that the Affilae program is in S2S, that the OneLink used is the one for the app being tested, that the link carries the expected parameters, that the click shows up in AppsFlyer, and finally that the OneLink Template and redirections are properly configured.

The link probably carries a hard coded value where a token belongs. Replace it with {affiliateTrackingId}, which Affilae fills in on every click. The other available tokens are {affiliateName}, {affiliateGroup}, {programName}, {programId}, {month}, {year} and {adId}.

The application rejects misplaced # and & characters. Copy the link from AppsFlyer without editing it by hand, then add your tokens.

No. That parameter should only appear on links used for a retargeting campaign. Adding it everywhere means declaring campaigns to AppsFlyer that are not retargeting at all.

Yes. Once the integration is correctly configured, AppsFlyer passes the configured conversions and events to Affilae automatically.

Need help?

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

Contact Us