Firebase Analytics DebugView事件日志问题

发布于 2025-02-01 18:02:26 字数 1386 浏览 3 评论 0原文

我有一个使用Firebase Analytics并调整Analytics SDK的Flutter移动应用程序。我已经观察到在两个平台上某些事件都存在一个不匹配的问题。FireBase事件计数总是小于特定持续时间的调整事件计数,并且差异很大。这些事件在单个方法调用中接一个地记录了这些事件。

为了调试和测试此问题,我使用Flutter和Firebase Analytics集成创建了一个测试应用程序。我使用Firebase DebugView检查所有事件是否已记录。我的观察是有时没有显示一些事件。

观察:如果我以随机顺序单击以下代码中的按钮,则某些事件未记录 期望:应在调试视图中记录每个事件

是否意味着未记录这些事件?实施中有任何问题吗?

flutter代码到日志事件:

child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            ElevatedButton(
                onPressed: () async {
                  await FirebaseAnalytics.instance.logEvent(name: "event_1");
                },
                child: Text("Event 1")),
            ElevatedButton(
                onPressed: () async {
                  await FirebaseAnalytics.instance.logEvent(name: "event_2");
                },
                child: Text("Event 2")),
            ElevatedButton(
                onPressed: () async {
                  await FirebaseAnalytics.instance.logEvent(name: "event_3");
                },
                child: Text("Event 3")),
            ElevatedButton(
                onPressed: () async {
                  await FirebaseAnalytics.instance.logEvent(name: "event_4");
                },
                child: Text("Event 4"))
          ],
        ),
      ),

I have a flutter mobile app which uses firebase analytics and Adjust analytics SDK. I have observed that there is a count mismatch issue for some events on both platforms.Firebase event count is always less than the Adjust event count for a particular duration and diff is quite large.These events are logged one after another in a single method call.

To debug and test this issue I have created a test application using Flutter and Firebase analytics integration. I used Firebase debugview to check if all events are logged or not. My observation is sometimes its not showing some events.

Observation: If I click buttons in below code in random order, some events are not logged
Expected: Each event should be logged in debug view

Does it mean that the events are not logged? Is there any issue in the implementation?

Flutter code to log events:

child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            ElevatedButton(
                onPressed: () async {
                  await FirebaseAnalytics.instance.logEvent(name: "event_1");
                },
                child: Text("Event 1")),
            ElevatedButton(
                onPressed: () async {
                  await FirebaseAnalytics.instance.logEvent(name: "event_2");
                },
                child: Text("Event 2")),
            ElevatedButton(
                onPressed: () async {
                  await FirebaseAnalytics.instance.logEvent(name: "event_3");
                },
                child: Text("Event 3")),
            ElevatedButton(
                onPressed: () async {
                  await FirebaseAnalytics.instance.logEvent(name: "event_4");
                },
                child: Text("Event 4"))
          ],
        ),
      ),

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文