I played around with the INSTALL_REFERRER and everything works perfectly fine using adb, but not when my app is in the Google Play-Store.
My scenario is:
1) One library containing my BroadcastReceiver (package com.sm.android) 2) My app using the library (package de.sm.android)
In the AndroidManifest.xml-file of the app, the receiver-part looks like:
<receiver
android:name="com.sm.android.helper.ReferralReceiver"
android:exported="true" >
<intent-filter>
<action android:name="com.android.vending.INSTALL_REFERRER" />
</intent-filter>
</receiver>
As said before, using adb I get the install-event, but when downloading the app from the store, I don't get the event. I build my url using https://developers.google.com/analytics/devguides/collection/android/v2/campaigns, it looks like https://play.google.com/store/apps/details?id=de.sm.riskulator&referrer=utm_source%3Dgoogle%26utm_medium%3Dbanner%26utm_content%3D234124%26utm_campaign%3Dpromo and forwards correctly to my app.
Thanks in advance, Sascha