Hi I'm Android developer, and I met a challenge about using Google Analytics Campaign using SDK v4.x.
I have refered to the following URL
https://developers.google.com/analytics/solutions/testing-play-campaigns
And I finished the step of 'Broadcasting an INSTALL_REFERRER Intent' Because I could see this message successfully.
Broadcasting: Intent { act=com.android.vending.INSTALL_REFERRER cmp=com.example.analyticsecommtest/com.google.analytics.tracking.android.AnalyticsReceiver (has extras) } Broadcast completed: result=0*
But I found this log :
Thread[GAThread,5,main]: No campaign data found.
The reference URL said, the log means that my Google Play Campaign Measurement implementation is not working correctly. Thus I tried to fix the work as checking out troubleshooting section.
there are several reasons.
The INSTALL_REFERRER intent was not broadcast
-> I finished it as I told
The Google Analytics Receiver did not receive the intent
-> I implemented CampaignTracking correctly, I think. and only CampaignTrackingReceiver uses INSTALL_REFERRER.
Now, What can I do to implement CampaignTracking successfully?
and do I need to implement Receiver.class that extends BroadcastReceiver? (even I use SDK v4.x)
one more question, if I send setCampaignParamsFromUrl on my application code, what happen is going on?**
Here is AndroidManifast xml code.
<receiver android:name="com.google.android.gms.analytics.CampaignTrackingReceiver"
android:enabled="true"
android:exported="true">
<intent-filter>
<action android:name="com.android.vending.INSTALL_REFERRER" />
</intent-filter>
</receiver>
<service android:name="com.google.android.gms.analytics.CampaignTrackingService"
android:enabled="true" />
<service android:name="com.google.android.gms.analytics.AnalyticsService"
android:enabled="true"
android:exported="false"/>
<receiver android:name="com.google.android.gms.analytics.AnalyticsReceiver"
android:enabled="true">
<intent-filter>
<action android:name="com.google.android.gms.analytics.ANALYTICS_DISPATCH" />
</intent-filter>
</receiver>
please answer anyone who has used Google Analytics Campaign successfully.
Thank you.