在Google Analytics跟踪Ver1中,它具有课程AnalyticsReceiver
。
但是当我使用Google Analytics跟踪Ver2时,它没有AnalyticsReceiver
类。我不知道应该使用哪一堂课。
在使用Google Analytics跟踪时声明的清单中:
<receiver
android:name="com.google.analytics.tracking.android.AnalyticsReceiver"
android:exported="true" >
<intent-filter>
<action android:name="com.android.vending.INSTALL_REFERRER" />
</intent-filter>
</receiver>
你能帮助我吗?
答案 0 :(得分:3)
Google似乎每次发布都会移动此类。根据您的Google AnalyticsSDK版本,android:name
的值会发生变化。以下是升级到v2以外的所有其他版本的所有版本。
Google AnalyticsSDK v2:com.google.analytics.tracking.android.CampaignTrackingReceiver
<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>
Google AnalyticsSDK v3:com.google.android.apps.analytics.AnalyticsReceiver
<receiver
android:name="com.google.android.apps.analytics.AnalyticsReceiver"
android:exported="true">
<intent-filter>
<action android:name="com.android.vending.INSTALL_REFERRER" />
</intent-filter>
</receiver>
Google AnalyticsSDK v4:com.google.android.gms.analytics.CampaignTrackingReceiver
<receiver
android:name="com.google.android.gms.analytics.CampaignTrackingReceiver"
android:exported="true">
<intent-filter>
<action android:name="com.android.vending.INSTALL_REFERRER" />
</intent-filter>
</receiver>