Google Play Campaign Attribution
When your app is downloaded from Google Play Store, the Play Store app broadcasts an INTENT_REFERRER to your app during installation. This intent contains the value of the referrer parameter of the link used to reach your app's Google Play Store page, if one was present.
To attribute an app download to a campaign, you must add a referrer parameter to any links that point to Google Play Store, and add a BroadcastReceiver to your app to receive and set the campaign information contained in the intent on your Google Analytics tracker.
It is recommended that most developers use the BroadcastReceiver provided with the SDK.
Add the Google Analytics receiver to your AndroidManifest.xml file
<!-- Used for Google Play Store Campaign Measurement-->
<service android:name="com.google.analytics.tracking.android.CampaignTrackingService" />
<receiver android:name="com.google.analytics.tracking.android.CampaignTrackingReceiver" android:exported="true">
<intent-filter>
<action android:name="com.android.vending.INSTALL_REFERRER" />
</intent-filter>
</receiver>
Add the Google Analytics receiver to your AndroidManifest.xml file
Add a referrer parameter to any URLs that will be linking directly to Google Play Store and set the value of that parameter to a string of Google Analytics campaign parameters that describe the source, as in this example:
https://play.google.com/store/apps/details?id=com.example.app&referrer=utm_source%3Dgoogle%26utm_medium%3Dcpc%26utm_term%3Dpodcast%252Bapps%26utm_content%3DdisplayAd1%26utm_campaign%3Dpodcast%252Bgeneralkeywords
Remeber: Google Analytics is case sensitive, so don't duplicate UTM parameters in uppercase or lowercase. Use always the same namespace.
Finally don't use "/" slash character in your UTM parameters, slash is used to separate paths and it can cause problem or error during Analytics recognition data.