Android GA dispatch issue

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





你可能感兴趣的:(Android GA dispatch issue)