我正在尝试跟踪人们是否通过广告或其他地方找到了我的 Android 应用程序。所以我发现谷歌分析可以通过这种形式生成的精心构造的网址来跟踪这一点:
http://code.google.com/mobile/analytics/docs/android/#android-market-tracking
看起来像这样:
http://market.android.com /search?q=pname:com.example.application&referrer=utm_source%3Dgoogle%26utm_medium%3Dcpc%26utm_campaign%3Dcampaign
...然后将分析 .jar 添加到我的项目中并将其添加到我的应用程序清单中:
<!-- Used for install referrer tracking -->
<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>
所以我的问题是:如果我想仅跟踪推荐而仅跟踪其他内容,我是否需要任何 GoogleAnalyticsTracker.*;我的活动中的代码?
I'm trying to track whether people have found my Android app from an ad, or elsewhere. So I found that google analytics can keep track of that via the carefully constructed url generated by this form:
http://code.google.com/mobile/analytics/docs/android/#android-market-tracking
which would look something like this:
http://market.android.com/search?q=pname:com.example.application&referrer=utm_source%3Dgoogle%26utm_medium%3Dcpc%26utm_campaign%3Dcampaign
...and then adding the analytics .jar to my project and adding this to my app's manifest:
<!-- Used for install referrer tracking -->
<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>
So my question is: if I want to track only referrals and nothing more, do I need any of the GoogleAnalyticsTracker.*; code in my activities?
发布评论
评论(1)
不,您不需要为此使用 GoogleAnalyticsTracker。
只需像这样创建您自己的 Tracker 类:
并将下一行添加到您的 AndroidManifest.xml 中
即可。
No, you don't need to use the GoogleAnalyticsTracker for that.
Just create your own Tracker class like that:
And also add next lines into your AndroidManifest.xml
That's it.