How to use Google Analytics Campaign on Android?
Hi I am an Android developer and I am facing the problem of using Google Analytics campaign with SDK v4.x.
I am referring to the following url
https://developers.google.com/analytics/solutions/testing-play-campaigns
And I ended the step "Broadcast the INSTALL_REFERRER intent", because I could see this message successfully.
Broadcast: Intent {act = com.android.vending.INSTALL_REFERRER CMP = com.example.analyticsecommtest / com.google.analytics.tracking.android.AnalyticsReceiver (additional features available)} Broadcast ended: result = 0 *
But I found this log:
Subject [GAThread, 5, main]: No campaign data found.
The specified link url, log means my Google Play Campaign Dimension implementation is not working correctly. So I tried to fix this working by checking the troubleshooting section.
there are several reasons.
-
INSTALL_REFERRER DEFINITION was not broadcast
-> I ended up like I said
-
Google Analytics recipient did not receive intent
-> I understood CampaignTracking correctly. and only CampaignTrackingReceiver uses INSTALL_REFERRER.
-
Now, what can I do to successfully complete CampaignTracking?
-
and I need to implement a Receiver.class that extends BroadcastReceiver? (even I am using SDK v4.x)
-
one more question, if I send setCampaignParamsFromUrl to my application code what happens? **
Here is the xml code for AndroidManifast.
<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>
answer everyone who has successfully used the Google Analytics campaign.
Thank.
source to share
No one has answered this question yet
See similar questions:
or similar: