InstallReferrerReceiver

  • The InstallReferrerReceiver is a BroadcastReceiver that listens for the Google Play INSTALL_REFERRER Intent when an app is installed from the Play Store.

  • It passes install referrer data to GTM for Mobile Apps and Google Analytics.

  • To enable this receiver, you need to add specific service and receiver entries to your AndroidManifest.xml file.

  • If both Google Analytics and Google Tag Manager SDKs are used, only this receiver needs to be enabled to set Campaign data.

public final class InstallReferrerReceiver extends CampaignTrackingReceiver

The Google Play com.android.vending.INSTALL_REFERRER Intent is broadcast when an app is installed from the Google Play Store. This BroadcastReceiver listens for that Intent, passing the install referrer data to GTM for Mobile Apps and Google Analytics.

To enable this receiver, add the following to your AndroidManifest.xml file:

<!-- Used for install referrer tracking-->
 <service android:name="com.google.android.gms.tagmanager.InstallReferrerService"/>
 <receiver
     android:name="com.google.android.gms.tagmanager.InstallReferrerReceiver"
     android:permission="android.permission.INSTALL_PACKAGES"
     android:exported="true">
     <intent-filter>
         <action android:name="com.android.vending.INSTALL_REFERRER" />
     </intent-filter>
 </receiver>
 
This receiver will automatically invoke the Google Analytics receiver to set the Campaign data. If both the Google Analytics SDK and Google Tag Manager SDKs are in use, only this receiver needs to be enabled.

Public Constructor Summary

Inherited Method Summary

Public Constructors

public InstallReferrerReceiver ()