如何将通用分析事件迁移到Google Analytics(分析4)?
我在我的头部/中有一个通用分析脚本,然后在整个程序中我都有分析
onclick="ga('send', 'event', {eventCategory: 'someCategory', eventAction: 'create', eventLabel: 'big-btn'})
。 。
我将如何创建在GoogleAnalytics4中开火的事件,以及如何使它们在报告中显示?
谢谢
I have a universal analytics script in my <head/, and then throughout the program I have analytics.js events like:
onclick="ga('send', 'event', {eventCategory: 'someCategory', eventAction: 'create', eventLabel: 'big-btn'})
I am now trying to re-create these events in google analytics 4 without using the "Collect Universal Analytics events" toggle.
How would I create the events to fire in googleAnalytics4 and how would I be able to have them show up in the reports?
Thank you
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
GA4是使用GTAG实现的,您使用该GA4来发送事件。例如,
事件的名称是第二个参数,定义在第三个参数的对象中。
定义可以具有您想要的任何名称(有一些限制)。要在报告中访问它们,它们需要是内置的定义,或者您可以在“配置”部分中将它们添加为自定义。这意味着您可以使用更适合活动的名称。
GA4 is implemented using gtag, which you use to send events. e.g.
The event's name is the second parameter, and the definitions are in the object for the third parameter.
Definitions can have any name you want (with some restrictions). To access them in reports, they need to be a built-in definition, or you can add them as custom definitions in the configuration section. This means you can use names that are more appropriate to your event.