Google Analytics,安装跟踪 android
我想使用谷歌分析跟踪我的应用程序的安装引用。
我不想使用跟踪浏览量和事件功能,只需安装。
所以我在我的应用程序中添加了 sdk jar,将这些行添加到清单中:
<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>
并发布应用程序。
但如何才能看到统计数据呢?我从未输入过我的 UA-xxxxxxx ID。
对于页面浏览量和事件跟踪,它在这里:
tracker.start("UA-YOUR-ACCOUNT-HERE", this);
但正如自述文件所说:(注意:不要在应用程序 onCreate() 中启动 GoogleAnalyticsTracker 方法(如果使用推荐跟踪)。
但是对于引用者,我应该将我的 ID 放在哪里?
在谷歌分析控制台中观看的网址是什么?
谢谢
I want track install referer for my application using google analytics.
I don't want use the Tracking Pageviews and Events feature, only install.
So I added the sdk jar in my app, add these lines to the manifest :
<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>
And publish the app.
But how can see the stats ? I never entered my UA-xxxxxxx id.
For the Pageviews and Events tracking it's here :
tracker.start("UA-YOUR-ACCOUNT-HERE", this);
But as thew readme says : (NOTE: do not start the GoogleAnalyticsTracker in your Application onCreate()
method if using referral tracking).
But with referer where do I put my id ?
And what is the url to watch in the google analytics console ?
Thx
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这样做的方法或多或少是这样的:
我在本文中详细解释了推荐跟踪器的工作原理:http://www.dev-articles.com/article/Analytics-referral-tracking-for-Android-447001
the way to do it is more or less like this :
I explain a bit more how referral tracker work in this article : http://www.dev-articles.com/article/Analytics-referral-tracking-for-Android-447001
这行不通。您在清单中声明的接收器是在 Analytics 库中定义的,但是该接收器所做的只是将事件(例如引用信息)填充到项目数据目录内的 google_analytics.db sqlite 数据库中。
仅当您使用适当的 ID 调用 tracker.start() 后,跟踪器才会启动,稍后当您执行类似 tracker.trackPageView("/main") 的操作时,引荐来源网址信息才会传递到 Google Analytics 服务器中...并且当然,本例中的 URL 是“/main”。
“引荐来源网址”本身没有意义,只有在综合浏览量的上下文中才有意义。
This won't work. The receiver you declared in your manifest is defined in Analytics library, however all this receiver does is stuffs the event (e.g. the referrer info) into an google_analytics.db sqlite database inside your project's data dir.
Only after you call tracker.start() with the appropriate ID, the tracker is started, and later on when you do something like tracker.trackPageView("/main") the referrer info is passed on into Google Analytics servers... And of course the URL in this case is '/main'.
The "referrer" does not make sense on it's own, only in the context of the pageview.