简体   繁体   English

在 Google Analytics(React 应用程序)中跟踪自定义事件

[英]Keeping track of custom events in Google Analytics (React app)

I've been running into some difficulty with Google Analytics and keeping track of some custom events that I've made on a React app, using Firebase to handle GA.我在使用 Google Analytics 时遇到了一些困难,并跟踪我在 React 应用程序上创建的一些自定义事件,使用 Firebase 来处理 GA。 The event I'm trying to keep trying to keep track of is a string, that will be an "affiliate code" that customers will type in to be able to use the site.我一直试图跟踪的事件是一个字符串,这将是一个“附属代码”,客户将输入该代码才能使用该网站。 This project is for a client that wants to be able to see the total # of people that have entered in various affiliate codes.该项目适用于希望能够查看输入各种会员代码的总人数的客户。

So far, I've been able to create and log my custom events I've made, but I don't see any way to see the totals of them over time.到目前为止,我已经能够创建和记录我所做的自定义事件,但我看不出有什么方法可以随着时间的推移查看它们的总数 I can see the recent codes sent in the last 30 min from the "realtime" page, but not over all time.我可以从“实时”页面看到最近 30 分钟内发送的最新代码,但并非一直如此。

To log events, I made a helper function that calls the logEvent() method from firebase/analytics .为了记录事件,我制作了一个助手 function,它从 firebase firebase/analytics调用logEvent()方法。

addEvent(eventName, parameters = undefined) {
    if (process.env.NODE_ENV === "production") {
      logEvent(this.analytics, eventName, parameters);
    }
  }

In the specific instance of this affiliate code, this is how I'm calling it:在此会员代码的特定实例中,我是这样称呼它的:

Firebase.addEvent("affiliate_code_entered", {
      affiliate_code: formattedVal,
    });

Does anyone know if there's something I can do to make sure I can see the totals of these affiliate codes entered?有谁知道我是否可以做些什么来确保我可以看到输入的这些联盟代码的总数? Any help would be appreciated, thank you!任何帮助将不胜感激,谢谢!

You can view the statistics about your events in the Firebase console under the Events tab.您可以在 Firebase 控制台的“ 事件”选项卡下查看有关您的事件的统计信息。 This dashboard shows the event reports that are created for each distinct type of event logged by your app.此仪表板显示为您的应用程序记录的每种不同类型的事件创建的事件报告。 Though, you might not see it right away due to Analytics data reporting delay .但是,由于Analytics 数据报告延迟,您可能不会立即看到它。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在 Firebase 分析控制台 (Swift) 中记录自定义事件 - Logging custom events in the Firebase Analytics console (Swift) 如何在 firebase 分析自定义事件中将对象数组作为参数传递 - How to pass array of objects as parameter in firebase analytics custom events Firebase 事件的 Google Analytics,因为 Google Ads 中的转化不适用于 Android - Google Analytics for Firebase events as conversions in Google Ads not working for Android Sending Google Analytics Events via API: How to get app_instance_id or client_id from Firebase SDK from web client? - Sending Google Analytics Events via API: How to get app_instance_id or client_id from Firebase SDK from web client? Firebase 分析不提供自定义事件详细信息(总计)0 项 - Firebase analytics not give Custom events details instead (total) 0 items Firebase iOS 的分析——带有预定义事件的自定义参数 (Swift) - Firebase Analytics for iOS — custom parameters with predefined events (Swift) 删除 firebase 分析事件 - Delete firebase analytics events com.segment.analytics.android:将我的应用程序提交到 Google Play 控制台时出现分析错误 - com.segment.analytics.android:analytics error while submitting my app to Google Play Console 在使用 Google Analytics 4 自动增强测量事件时报告 Data Studio 中的下载量为 URL? - Reporting URL of downloads in Data Studio when using Google Analytics 4 automatic enhanced measurement events? React Native - Firebase 自定义事件未记录在控制台中 - React Native - Firebase custom events are not logged in the console
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM