User Invite Tracking

1. Introduction

Invite_Tracking_new.png

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.

1.1 Why is Tracking User Invites So Useful?

1. 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, re-target or incentivize.

2. 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".

3. 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.

You can use AppsFlyer's cost parameters to assign cost to user invite installs, based on the alternatives.

For 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.

1.2 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.

Invite_Tracking_2.png

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

2. The Developer's Guide 

2.1 Set 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):

Android

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

iOS

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

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

2.2 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.

Android

LinkGenerator linkGenerator = ShareInviteHelper.generateInviteUrl(MainActivity.this);
linkGenerator.setChannel(“Gmail”); linkGenerator.addParameter("af_cost_value","2.5"); linkGenerator.addParameter("af_cost_currency","USD");
//Register to listener (shortLink will be generated by async way)
CreateOneLinkHttpTask.ResponseListener listener = this;
linkGenerator.generateLink(MainActivity.this, listener);
// shortLink response:
@Override
public void onResponse(final String oneLinkUrl) { /* share To App … */}

iOS

[AppsFlyerShareInviteHelper generateInviteUrlWithLinkGenerator:^AppsFlyerLinkGenerator * _Nonnull(AppsFlyerLinkGenerator * _Nonnull generator) {
[generator setChannel:@"channel_name"];
[generator setReferrerName:@"referrer_name"];
[generator addParameterValue:@"2.5" forKey: @"af_cost_value"];
return generator;
} completionHandler:^(NSURL * _Nullable url) {
/* share To App … */
}];

2.3 All Link Generator Setters

Android

API Name

Description

Usage

setChannel(String channel)

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

setCustomerID(String customerID)

Internal system’s customer user ID

Optional

addParameter(String key, String value)

A single key value custom parameter

Optional

addParameters(Map<String, String> parameters)

Multiple key value custom parameters

Optional


iOS

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

2.4 Tracking the senders 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.

Android

ShareInviteHelper.trackInviteSent(context, channel, additionalParametersForTheEvent_optional);

iOS

NSDictionary *optional_params = @{@"key": @"value"};
[AppsFlyerShareInviteHelper trackInvite:@"your_channel" parameters:optional_params]; 

2.5 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:

{
   af_referrer_appsflyer_id=1486491540044-6065693449807548958,
   af_channel=Gmail,
   test=value,
   media_source=af_app_invites,
   adset=null,
   campaign=None,
   af_status=Non-organic,
   af_referrer_image_url=http://bit.ly/2kiZDzu,
   af_referrer_name=”Ben Jones”,
}

More information about using conversion data: iOS and Android.

3. Custom Dashboard Views

Below are the available views of the Custom Dashboard that show user invite information:

Invite_Tracking_3.png

Invite_Tracking_4.png

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request
Powered by Zendesk