User Invite Tracking

Jamie Weider

Last update: April 10, 2018 16:45

Introduction

Allowing your existing users to invite their friends and contacts as new users to your app can be a key growth factor for your app. AppsFlyer allows you to track and attribute new installs originating from user invites within your app.

Note

User Invite Tracking is available on AppsFlyer's SDK versions 4.8.0 and above.

Why is Tracking User Invites So Useful?

Obtain information about the best referring users

Users that refer their friends to your app are high value engaged users, which you may want to preserve, retarget or incentivize.

Use the referring user information to personalize the first time experience for the new user

Instead of a general welcome message you could have a personalized message, which engages the new user much more. For example: "Welcome, John! Join your friend Marsha in an epic battle after you finish the tutorial".

Know the cost and ROI of user invites for better results

Are user invites free of charge? Not really. They use up your app's advertising "real estate", which could alternately get you real ads revenue.

Do user invites get you positive ROI, compared with the alternative? In some cases they do, and in others they don't.

Example

A banner gains you $5 RPM with ads views (here's a great way to measure it). On average, with 2% conversion rate of views to invites, and with 10% conversion rate of invites to installs, you get 2 new users from every 1K views. Therefore, using the same banner space to promote invites costs 5$/2=$2.5 per install. Add af_cost_value=2.5 value to reflect this cost on the dashboard.

Combined with your revenue reporting in-app events you are able to see which user invites campaigns get you the best or worst results, and which invite channels are best for your purposes.

How Does Tracking User Invites Work?

Installs attributed to an invite link generated by this API appear on the dashboard under the media source af_app_invites.

The channels used to send the invites through (mail, SMS, Facebook etc.) appear under the Channel grouping under the media source af_app_invites.

Selecting af_app_invites media source, and grouping by Channel, displays clicks and installs from user invites that went through Gmail and Facebook

The Developer's Guide

Set out below are the instructions for the developer for using Invite Tracking.

Setting OneLink

Invite Tracking utilizes the capabilities of OneLink to redirect the user to the relevant app store. Make sure to configure OneLink correctly for your app, and take the relevant OneLink ID.

Before calling startTracking in your app, set the OneLink which is invoked according to the OneLink ID (12345678 in this example):

AndroidiOS

AppsFlyerLib.getInstance().setAppInviteOneLink("12345678");

[AppsFlyerTracker sharedTracker].appInviteOneLinkID = @"12345678";

Note

It is critical to check that the correct OneLink ID is used, otherwise the created tracking link is broken.

Important

To generate a shortened OneLink with the User Invite feature you must set a sub-domain for your OneLink in the OneLink Configurations page, under Additional Configurations. If you do not set a unique sub-domain for your OneLink, a "long" OneLink is generated with all added parameters visible on the link.

Generating the Link

The LinkGenerator class builds the invite URL according to various setter methods which allow passing on additional information on the click. This information is available through getConversionData when the new user accepts the invite and installs the app. In addition, campaign and channel parameters are visible within the AppsFlyer Dashboard.

All Link Generator Setters

The channel through which the invite was sent (e.g. Facebook/Gmail/etc.)

Recommended

setCampaign(String campaign)

A campaign name

Optional

setReferrerName(String referrerName)

The name of the referring user

Optional

setReferrerImageURL(String referrerImageURL)

The URL to referrer user avatar

Optional

setReferrerCustomerId(String referrerCustomerID)

Set the customer_user_id of referrer user

Optional

addParameter(String key, String value)

A single key value custom parameter

Optional

addParameters(Map<String, String> parameters)

Multiple key value custom parameters

Optional

API Name

Description

Usage

setChannel :(NSString *) channel

The channel through which the invite was sent (e.g. Facebook/Gmail/etc.)

Recommended

setCampaign :(NSString *) campaign

A campaign name

Optional

setReferrerName :(NSString *) referrerName

The name of the referring user

Optional

setReferrerImageURL:(NSString *) referrerImageURL;

The URL to referrer user avatar

Optional

setReferrerUID :(NSString *) referrerUID

Internal system’s customer user ID

Optional

addParameterValue :(NSString *) value forKey:(NSString*)key

A single key value custom parameter

Optional

addParameters :(NSDictionary*) parameters

Multiple key value custom parameters

Optional

Tracking the Sender's Invites

It is recommended to generate an in-app event after the invite is sent to track the invites from the senders' perspective. This enables you to find the users that tend most to invite friends, and the media sources that get you these users.

You can send a regular in-app event or use trackInviteSent method instead. trackInviteSent is a ready made in app event encapsulated in an API for easier usage.

Retrieving Attribution Data After Invited User Install

All the parameters passed in the link generator are available by calling getConversionData. This allows you to retrieve the relevant parameters (such as referrer name and avatar url) and personalize the first time experience for the new user. This is an example of the attribution data returned by getConversionData: