CampaignTrackingReceiver
Stay organized with collections
Save and categorize content based on your preferences.
AI-generated Key Takeaways
CampaignTrackingReceiver is a BroadcastReceiver that tracks app installations from the Google Play Store with campaign data.
When an app is installed from the Google Play Store via a link with campaign data, Google Play broadcasts an INSTALL_REFERRER intent, which this receiver handles.
The CampaignTrackingReceiver passes the campaign data from the install referrer intent to Google Analytics.
To enable installation campaign reporting, register CampaignTrackingReceiver in your AndroidManifest.xml file.
If using Google Tag Manager, only the Google Tag Manager receiver needs to be enabled as it will automatically invoke the Google Analytics receiver.
The Google Play
com.android.vending.INSTALL_REFERRERIntent
is broadcast when an app is installed from the Google Play Store.
Google Analytics receiver for com.android.vending.INSTALL_REFERRER. Google
Play will broadcast the intent when an app is installed from the Google Play Store and has
campaign data available (i.e. the app was installed from a link to the Google Play Store).
This BroadcastReceiver
registers for that Intent and passes
the campaign data to Google Analytics.
To enable installation campaign reporting register CampaignTrackingReceiver in your
AndroidManifest.xml file:
Only one receiver can receive the install referrer setting. If Google Tag Manager is
being used by the application, then only the Google Tag Manager receiver needs to be enabled. The
Google Tag Manager receiver will invoke the Google Analytics receiver automatically.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-31 UTC."],[],["`CampaignTrackingReceiver` is a `BroadcastReceiver` for Google Analytics that handles the `com.android.vending.INSTALL_REFERRER` intent. When an app is installed from the Google Play Store, this receiver captures campaign data and forwards it to Google Analytics. To activate it, it requires registration in the `AndroidManifest.xml`. It has one main method, `onReceive`, to receive and process the `Intent`. If Google Tag Manager is used, its receiver will handle the data, automatically invoking the `CampaignTrackingReceiver`.\n"]]