How Google Play Install Referrer Works

When directing users to the Google Play™ Store, you can use the Google Install Referrer for 100% attribution accuracy. Google Analytics uses the install referrer to measure campaign performance as well. For information about the Google Install Referrer, you can reference the Google Analytics documentation.

Attribution Analytics also uses the install referrer by appending its tracking ID to the install referrer parameter when redirecting users to Google Play.

The following code shows an example of a Google Play link where we append our tracking ID (tracking_id) into the referrer parameter:

https://play.google.com/store/apps/details?id=com.hellochatty&referrer=tracking_id%3D123456789

For information about using an intermediate landing page with the referrer parameter, skip to Attributing Android Installs with Custom Landing Page using Referrer.

Setting Up App to Collect Install Referrer

When users install the Android mobile app, set up your app to allow the Attribution Analytics SDK to collect the install referrer value (com.android.vending.INSTALL_REFERRER). For information about implementing the Android SDK, you can read our developer quick start.

The install referrer is the value of the “referrer” parameter appended to the Google Play link. Since we append our tracking ID in the referrer parameter, Google allows us to collect this value upon install (via a receiver for the install referrer) and therefore, we can perform attribution with 100% accuracy.

Our Android SDK requires setting up a Attribution Analytics receiver in your Android manifest. Put this receiver inside your application tags as shown here:

<receiver android:name="com.tune.TuneTracker"> 
    <intent-filter> 
        <action android:name="com.android.vending.INSTALL_REFERRER" /> 
    </intent-filter>
</receiver>

The Attribution Analytics SDK sends the value of the install referrer to the Attribution Analytics platform, which parses out the tracking_id parameter and uses it to attribute the install. To ensure that the Install Referrer is collected properly, read our developer documentation on Testing the Google Play Install Referrer.

Passing Install Referrer in Postback URL

If you want to send the value of the install referrer as a macro in a postback URL, then you can include {conversion_referral} in the postback URL:

http://www.advertiser.com/conversion?referrer={conversion_referral}

The following example shows a Google Play link with the referrer set to our tracking ID and some Google Analytic parameters:

https://play.google.com/store/apps/details?id=com.hellochatty&referrer=tracking_id%3D123456789&utm_source%3Dmdotm%26utm_medium%3Dbanner%26utm_campaign%3Dcampaign

The following example shows the postback notification:

http://www.advertiser.com/conversion?referrer=tracking_id%3D123456789&utm_source%3Dmdotm%26utm_medium%3Dbanner%26utm_campaign%3Dcampaign

The value of the conversion referral includes our tracking ID as well as the Google Analytics parameters in the string.

Potential Issues with Browser-Based Google Play Store

The Google Install Referrer only works (uniquely identifies a specific advertiser or partner/publisher) when users install apps through the Google Play Store app, not when they install apps through the browser-based (web) version of the Google Play Store (or through some other third-party Android app store such as the Amazon Appstore for Android). So if a user installs an app via the web version of the Google Play Store (using a mobile browser), then the INSTALL_REFERRER parameter is not sent.

From the Google developer documentation about campaigns and analytics:

“Google Play Campaign Tracking does not currently support web-to-device installs initiated from the web Play Store.”

On some Android devices, users who click a TUNE link to an app are prompted with two options: open the link via the Google Play Store app or open it in their mobile web browser. Newer Android devices don’t prompt users to choose between the Google Play Store app and the Google Play web site, but this issue remains problematic for older Android devices.

Attribution Analytics generates direct links to Google Play, which are subject to potential loss of the INSTALL_REFERRER data. Only use direct links when an advertising partner (publisher) requires it. Whenever possible, use redirect links/TUNE links instead.

Attributing Installs with Custom Landing Page Using Referrer

If you want to send users to an intermediate landing page before sending them to the Google Play Store, you need to pass an Attribution Analytics tracking ID using query string parameters.

For example, you want the final destination to be the following Google Play Store URL:

https://play.google.com/store/apps/details?id=com.hellochatty

However, you also want to send users to your own custom landing page before redirecting to the Google Play Store. In this case, you can pass a tracking ID through your custom landing page to the Play Store link using the referrer parameter.

In Attribution Analytics, use the custom landing page as the destination URL, and include the {tracking_id} macro in it:

https://yourcustomlandingpage.com/page1.php?sub={tracking_id}

Attribution Analytics replaces the {tracking_id} macro on click so users are redirected to the destination URL with the actual tracking ID value inserted:

https://yourcustomlandingpage.com/page1.php?sub=123456789

After users land on your custom page, you need to retrieve the tracking ID value from the query string parameter, URL-encode it, and append it to the Play Store link in the Google Install Referrer parameter:

https://play.google.com/store/apps/details?id=com.hellochatty&referrer=tracking_id%3D123456789

When the above steps are implemented correctly, users who click on your TUNE link are first routed to your custom landing page with their tracking ID appended in a query string parameter. Your page then forwards information the parameter to the referrer parameter in the Play Store link.

1 Comment

Leave a reply
  • Grace  •  December 10, 2015

    The tracking_id value is generated from our measurement URL...not Google.