关闭

Android GA dispatch issue

3274人阅读 评论(0) 收藏 举报

Android GA SDK

https://developers.google.com/analytics/devguides/collection/android/v3/

目前已经是version 3, 我的app里用的仍然是version 2。原因在于

* jar file size. v3的GA jar有900多K,而v2的jar不到200K

* v2可以通过

GAServiceManager.getInstance().setDispatchPeriod(60);  //set 60 seconds

   来设置dispatch interval period。虽然v3也可以通过

GAServiceManager.getInstance().setLocalDispatchPeriod(60)

   来设置,但该方法已经deprecated,原因是“The local dispatch methods referenced in this document have been marked as deprecated due to the forthcoming availability of Google Analytics as part of Google Play Services. Local dispatch methods may still be used in non-Google-experience devices.”  (ref link)。而且由于这个因素,搞得setLocalDispatchPeriod方法不起作用, 不管是否到时间,或是restart app


android GA sdk dispatch issue

v3 https://developers.google.com/analytics/devguides/collection/android/v3/dispatch

v2 https://developers.google.com/analytics/devguides/collection/android/v2/dispatch

关于GA dispatchandroid缺省的dispatch interval30分钟iOS2分钟。不管你的app是在front side or back end,都可以。另外当app restart时也会dispatch.

ref links:

https://groups.google.com/forum/#!msg/google-analytics-measurement-protocol/VqMFX-cuD5M/HRpAn1YW-MEJ

http://stackoverflow.com/questions/17026648/analytics-sendevent-not-sending-data



GA migration v2.x to v3

https://developers.google.com/analytics/devguides/collection/android/v3/migration





0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:1221008次
    • 积分:14901
    • 等级:
    • 排名:第759名
    • 原创:273篇
    • 转载:151篇
    • 译文:6篇
    • 评论:123条
    文章分类