Documentation/Attribution/Methodologies

How Google Play Install Referrer Works

Lucas Brown
posted this on December 04, 2012 21:20

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, please visit Google Analytics uses install referrer.

MobileAppTracking™ (MAT) 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 advanced usage of the referrer parameter, please visit referrer parameter with custom landing pages.

 

Setup App to Collect Install Referrer

When users install the Android mobile app, setup your app to allow the MAT SDK to collect the install referrer value (com.android.vending.INSTALL_REFERRER). For information about Android SDK implementation, please visit MAT Android SDK integration guide.

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 MAT receiver in your Android manifest. Put this receiver inside your application tags as shown in the following example.

<receiver android:name="com.mobileapptracker.Tracker" android:exported="true">
   <intent-filter>
       <action android:name="com.android.vending.INSTALL_REFERRER" />
   </intent-filter>
</receiver>

 

The MAT SDK sends the value of the install referrer to the MAT platform, which parses out the tracking_id parameter and uses it to attribute the install. To ensure that the Install Referrer is collected properly, please visit Testing the Google Play Install Referrer.

 

Install Referrer passed 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} into the postback URL as shown in the following example.

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

 

The following example shows a Google Play measurement URL 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.

 

Comments

User photo
Paresh Mayani

Hello Lucas,

I have been trying to resolve the issue of app install tracking since a long. Tried and implemented some code to get REFERRER value and its also same as the way you mentioned above. But I am being failed to get referrer value in all my devices of 2.3, 4.0, 4.1

What I found is: "Google Play Campaign Measurement does not currently support web-to-device installs initiated from the web Play Store." from this link: https://developers.google.com/analytics/devguides/collection/android/v2/campaigns#google-play-implement

So could you please confirm whether above example is working fine? Are you able to get referrer value right now?

It would be a great help.

April 23, 2013 06:36
User photo
Pratyesh Singh

Hi Lucas,

i'm not able to get the right data for REFERRER

can you please give a link for sample application.

how are you implementing this on android application complete code.

thanks in advance.

April 29, 2014 03:22
User photo
duraisamy

How to get google  playstore url referrer values inside mobile app.

December 03, 2014 22:01