android - Google Analytics Android SDK V4 混淆

标签 android google-analytics google-analytics-firebase

我一直在使用Google Analytics SDK for Android V3到目前为止,在我的应用程序中,它一直运行良好(Android 3.0 及更高版本支持我的应用程序)。现在V3已经被弃用,最新的是Google Analytics SDK v4 for Android .

我可以通过阅读官方文档和 this 来让它工作。博客文章。但我还有几个问题:

1) 什么是全局跟踪器应用跟踪器?它背后的概念是什么?如果我有多个 Android 应用程序,那有什么区别。我的所有应用程序都应该具有相同的 Global Tracker 吗?从这个意义上说,它是“全局性的”吗?我在这里有点不知所措。
2) V4使用Google Play Services V4.3及以上版本,没有V3那样的独立库。那么,删除 V3 库 jar 文件和代码是否安全? Google Developers 页面确实这样说:

The SDK can be used and will work on devices that do not have Google Play Services. In this case the SDK will will automatically fall back to local dispatching.

还有

In general, devices running Android 2.3 (Gingerbread) or later and have the Google Play Store app installed receive updates within a few days. This allows you to use the newest APIs in Google Play services and reach most of the devices in the Android ecosystem (devices older than Android 2.3 or devices without the Google Play Store app are not supported).

那么对于 V4,我的应用跟踪是否仍可在所有可能没有 Google Play Services V4.3 或更高版本的设备上工作?如果没有,那么应用程序是否会因为找不到分析代码所需的特定类而崩溃?或者,是否可以假设所有搭载 Android 2.3+ 的设备都与 Analytics V4 兼容?

注意: Google Play Services文档页面确实显示了如何检查 Google Play 服务是否可用。但我不想不必要地提示用户,因为分析不会影响我的应用程序的功能。另外,我可以检查一下,但我不想错过任何分析信息。

最佳答案

1) What is a Global Tracker and an App Tracker? What is the concept behind it? If I have more than one Android Apps, then whats the difference. Should all my apps have the same Global Tracker? is it 'global' in that sense? I am a little clueless here.

它们几乎是一样的。只是以不同的方式配置以作为示例。如果您有多个应用程序,您可能希望同时使用这两种应用程序,这样您就可以将每个应用程序跟踪到它自己的 Google Analytics 属性以及汇总所有数据的全局属性。但是跟踪器对象是完全相同的。大多数情况下,您只使用其中一种。因此,请忽略文档中的那部分,仅将它们作为示例阅读以了解如何设置跟踪器。选择一个并坚持下去。我会推荐xml配置方法,更干净。

2) The V4 uses Google Play Services V4.3 and above, and does not have a Standalone Library like V3 had. So, is it safe to remove the V3 library jar file and the code? The Google Developers page does say this

是的。安全移除。任何高于 2.2 的 Android 设备都将安装 Play Services。您可能想检查是否不能在您的应用中完全跳过跟踪。

关于android - Google Analytics Android SDK V4 混淆,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23898312/

相关文章:

google-analytics - 尽管未达到配额,但 Google Analytics Reporting API "quota limit reached"

android - Google Analytics Tracker 不适用于 Android 应用程序

android - 如果身份验证不成功,Firebase Auth 是否会返回错误代码?

android.provider.Settings.Secure.ANDROID_ID 错误处理

java - Android 自定义主页按钮

javascript - Google Analytics : Events sent, 但未出现在报告中

php - 如果语言不在 URL 中,如何在谷歌分析中检查每种语言的访问数据

google-analytics - 从后端使用Google Analytics

android - fragment PopBackStack

google-analytics - 在GTM中,如何在Click Element触发器上使用CSS选择器?