User invite attribution

At a glance: Attribute and record new installs when existing users refer others to use your apps.

Invite_Attribution_new.png

About user invite attribution

User invites mean your existing app users share links that redirect others (for example, their friends) to download/open your app.

User invite attribution means you attribute any new app installs or engagements to the users who sent the referrals.

User invite attribution lets you:

  • Analyze the cost and ROI of user invites. User invites use up your app's advertising space, which could otherwise be used to generate ad revenue. You may want to see whether user invites provide better ROI than alternatives.
  • Record information about your users who refer others the most. Users who invite others to your app are high-value, engaged users, who you may want to retarget or incentivize.

You can also use data from the links to:

  • Customize the new user's experience. For example, open the app to specific content, or instead of a general message, personalize a welcome message, such as, "Hi John! Your friend Maria wants to challenge you to a game. Play now!"
  • Reward users who refer others. Learn more

The user invite links that users share with others are actually OneLink custom links (short URLs) generated by the AppsFlyer SDK integrated in your app. The settings of your OneLink ensure that users who get an invite are redirected to the right placeto the correct app store, into your app, or deep linked/defer deep linked to a specific page of your app. Learn more about OneLink

Flow

The flow works as follows:

  1. User A taps from within their app to share the app with a friend. (User A has the app installed and is logged in.)
  2. The tap generates a link with a parameter identifying User A on it.
  3. User A sends the link to User B via email/WhatsApp/SMS, etc.
  4. If User B:
    • Has the app installed, the app opens. User B can be deep linked to a specific page in the app and/or be rewarded.
    • Doesn’t have the app installed, they are sent to the correct app store. User B can be deferred deep linked to a specific page in the app after the first app launch, and/or User A can be rewarded.
    • Performs an in-app event, User A can be rewarded.

Viewing data

User invite data is available via AppsFlyer dashboards and reports. In AppsFlyer dashboards, you can filter for user invite attribution by:

  • Media source: App invites. 
  • Channel: As decided by the marketer.
  • Campaign: As decided by the marketer.

In reports, the media source (pid parameter) is sent by the SDK with the default value af_app_invites

Procedures

To create user invite links:

  1. Create a OneLink template.
  2. Decide the channel and campaign parameter values. See parameters.
  3. Decide which use cases you want for the links. Common use cases include:
    • Deep link new users to a specific page in the app.
    • Record which users made the referral.
    • Reward new users.
  4. Contact your Android and iOS developers to plan which parameters will be responsible for the use cases you want for the links. See available parameters.
  5. Tell the developer to implement deep linking (using the desired behavior of the parameters in the code).
  6. Tell the developer to implement user invites in the following platforms:
    Android iOS Unity

    See Android user invite in the Dev Hub.

    See iOS user invite in the Dev Hub.

Parameters

Parameters/values provided to the developer to implement in the SDK

Parameter/value Remarks Record the value/use case the developer should implement
OneLink template ID

The ID of the OneLink template with the basic settings on which all the user invite links will be based. For example: H5hv

 

Channel

The channel name. This helps you sort and view attributions by channel in the AppsFlyer UI.

 

Campaign

The campaign name. This helps you sort and view attributions by campaign in the AppsFlyer UI.

 

is_retargeting=true

Added if your campaign is to retarget existing users.

 

deep_link_value

A parameter to be used on the referred user's device to provide them with a specific experience. Typically, this is used to name the specific page that users will be directed to. For example, if your app sells fruit, you can deep link users to the apple page.

 

deep_link_sub1

A parameter to be used on the referred user's device to provide them with a specific experience. As deep_link_value is typically used to send users to a specific page, this parameter, can be used for any other desired functionality. For example, to add a reward or discount, or record the user who made the referral. 

 

deep_link_sub2

 

deep_link_sub3

 

deep_link_sub4

 

deep_link_sub5

 

deep_link_sub6

 

deep_link_sub7

 

deep_link_sub8

 

deep_link_sub9

 

deep_link_sub10

 

[Optional] pid

By default, the links you generate include the media source (pid parameter) with the value af_app_invites

To change the value, your developer needs to add a custom parameter called pid with the value you want. Note: For Android, this only works for SDK V6.4.2+.

 

Branded name

The branded domain name. This helps you sort and view attributions by branded domain in the AppsFlyer UI.

 

Example

Mark the marketer has an app that sells fruit. He wants to create a link that deep links users to a specific fruit page, with the option to buy a specific amount of fruit.

He wants this link to be able to be sent via user invite and to reward referrers each time their referral leads to a new app install and fruit purchase.

To get all this to work, Mark send his developer the following list of parameters and values to be used when implementing the user invite links: his developer to implement:

Parameter Value Remarks
deep_link_value fruit_name For deep linking using the AppsFlyer UDL method.
deep_link_sub1 promo_code For deep linking using the AppsFlyer UDL method.
deep_link_sub2 referrer_id For link creation via the SDK.
param_1 referrer_id For the in-app event that records each purchase.
Channel mobile_share For attribution, and to see data in AppsFlyer.
Campaign summer_sale For attribution, and to see data in AppsFlyer.

Additional information

Record user invites as in-app events

Recording an in-app event after a user sends a user invite helps you identify users who refer others, as well as the media sources that get you these referrers.

To log a user invite in-app event:

  • Send an af_invite event. The developer needs to implement this following our dev hub instructions.

Note: You can add more parameters that you want to associate with the event. Choose parameters that will provide additional context to the event and enrich the data. Learn more

Reward referrers for user invite installs

To reward referrers for a user invite that results in an install:

  1. Make sure the referrer ID is the value of one of the deep_link_sub1-10 parameters.
  2. Tell your app developers to implement deep linking (using the desired behavior of the chosen parameter in the code).
  3. Tell your backend developers to work with your app developers to retrieve the referrer IDs (from AppsFlyer reports) and reward the referrers.

Example:

  1. User A invites User B to install your app.
  2. When User B launches the app, the app gets User A's referrer ID.
  3. Your backend retrieves the referrer ID from AppsFlyer reports.
  4. In your backend, add User A's referrer ID to a list of users to be rewarded.
  5. When User A launches the app, check if their referrer ID is on the list of users to be rewarded, and if it is, reward them.

Reward referrers for referred user actions

To reward referrers for a user invite that results in a specific in-app event:

  1. Create the in-app event you want to reward.
  2. Tell the developer to add a parameter (for example, param_1) to the event with the value being the referrer ID. Note: The referrer ID is originally recorded on the app install using your selected parameter (deep_link_sub1-10).
  3. Tell your backend developers to work with your app developers to retrieve the referrer IDs (from AppsFlyer reports) and reward the referrers.

Example:

  1. User A invites User B to perform an action in your app.
  2. When User B performs the action, an in-app event is recorded that contains User A's referrer ID.
  3. Your backend retrieves the referrer ID from AppsFlyer reports.
  4. In your backend, add User A's referrer ID to a list of users to be rewarded.
  5. When User A launches the app, check if their referrer ID is on the list of users to be rewarded, and if it is, reward them.

Traits and limitations

Trait Description
SDK version Must have AppsFlyer SDK version 4.8.0+ and Unity SDK version 4.17.0+.
Social media apps landing page Links generated from user invites can't implement social media apps landing pages.
Time to live (TTL) The default time to live (TTL) for OneLink short URLs created via SDK user invite is 60 days. It's extended by 60 days each time the link is clicked.
Pricing Free for all account plans
iOS 14+ User invite attribution doesn't use IDFA, so iOS 14 does not impact it in any way.
URL ID

The URL ID (or shortlink ID) can be edited to highlight your campaign offering. For example: https://myapp.onelink.me/abc123/apples.The URL ID must not exceed 50 characters and can be a combination of letters and numbers. By default, it is 8 characters.

Note: You can only edit the URL ID if the current ID isn't already in use.