[英]Flutter App Counting Google Analytics Events TWICE
I am logging some predefined event and custom events on my flutter app using Google Analytics through the below way:我通过以下方式使用 Google Analytics 在我的 flutter 应用程序上记录一些预定义事件和自定义事件:
FirebaseAnalytics.instance.logEvent(
name: "select_content",
parameters: {
"content_type": "BusinessProfile",
"item_id": selectedbusinessprofileid,
"user_id": globaluserid,
"Access_Method": "Ad",
"Ad_Method": "CategoriesBoard",
"Gender": globalusergender,
"City": globaluserdefaultcity,
},
);
FirebaseAnalytics.instance.logEvent(
name: "New_Business_Profile",
parameters: {
"category": bpaddselectedcategory,
"Gender": globalusergender,
"City": globaluserdefaultcity,
},
);
the problem is that each event is logged TWICE in google analytics dashboard, in both debug view and production view.问题是每个事件在调试视图和生产视图中都在谷歌分析仪表板中记录了两次。 the behavior is for both predefined events like "select_content" and any other customer event I create like "New_Business_Profile".该行为适用于预定义事件(如“select_content”)和我创建的任何其他客户事件(如“New_Business_Profile”)。
I did some search, some mentioned I need to remove the events I've created from Google Analytics Admin.我进行了一些搜索,其中一些提到我需要从 Google Analytics Admin 中删除我创建的事件。 I did and delete it, the events are still counting twice like this.我删除了它,事件仍然像这样计数两次。
any idea what is the reason of this problem or how can I solve it?知道这个问题的原因是什么或者我该如何解决?
Edit: Solved in Debug mode, Removing the events from Google Analytics Admin solved the issue in Debug mode but it took around two hours to be corrected.编辑:在调试模式下解决,从 Google Analytics Admin 中删除事件解决了调试模式下的问题,但需要大约两个小时才能更正。 will check the production mode in 24 hours and report if solved too.将在 24 小时内检查生产模式,并在解决后报告。
Edit: Worked fine on live too.编辑:在现场也工作得很好。
I suggest you to use Dart Debugger and breakpoints.我建议你使用 Dart 调试器和断点。 Most likely your code is invoked more than once.您的代码很可能被多次调用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.