Google Analytics Implementation 是否需要跟踪已签名的 apk

Does Google Analytics Implementation required signed apk to be tracked

是否需要仅安装已签名的 apk 才能通过 Google Anaytics 获取实时数据。 我已经按照“https://developers.google.com/analytics/devguides/collection/android/v4/”的 google 说明实施了 google 分析,但在调试中没有获得实时数据,这意味着分析中的活跃用户数仍然为 0。 请帮助我,或建议我在我的应用程序中实施 google 分析的说明。 提前致谢

否,Google Analytics 将从应用程序上传数据,即使该应用程序未从 Google Play 商店签名或安装。您可能启用了干燥 运行 模式(检查您是否已调用 GoogleAnalytics.setDryRun(true) 或在您的 Analytics XML 配置中设置干燥 运行 模式)或者您的跟踪器丢失-已配置(缺少或错误的跟踪器 ID)。

尝试将日志记录设置为临时详细并检查您的 logcat:

import com.google.android.gms.analytics.GoogleAnalytics;
import com.google.android.gms.analytics.Logger;
..
     analytics = GoogleAnalytics.getInstance(this);
     // Remove before ship. Do not ship your application with verbose log level!
     analytics.getLogger().setLogLevel(Logger.LogLevel.VERBOSE);

新的 google 分析帐户可能需要 24-48 小时才能开始显示数据,但稍后它会像现在一样即时。 sample app作为参考,借助extra文件夹下SDK中的sample,完美。

感谢 DalmTo 的回答(在评论部分)