方法在GTAG事件中是什么意思/做?
我正在阅读Google Analytics(分析文档),我对方法的含义有些困惑。在他们的文档中,他们具有
gtag('event','login',{'method':'google'});
https://developers.google.com/analytics/devguides/collection/collection/collection/collection/collection/collection/collection/collection/ gtagjs/sending-data
当您转到“度量分析”页面时,未列出方法。他们列出了事件的以下参数
gtag('event', <action>, {
'event_category': <category>,
'event_label': <label>,
'value': <value>
});
https://developers.google.com/analytics/devguides/collection/collection/gtagjs/events
未列出方法。有人知道这个参数做什么吗?跟踪事件需要吗?
I'm reading the google analytics documentation and I'm slightly confused about what method means. In their documentation they have
gtag('event', 'login', {'method': 'Google'});
https://developers.google.com/analytics/devguides/collection/gtagjs/sending-data
When you go to the measure Analytics page, method isn't listed in. They list the following params for event
gtag('event', <action>, {
'event_category': <category>,
'event_label': <label>,
'value': <value>
});
https://developers.google.com/analytics/devguides/collection/gtagjs/events
which doesn't list method. Does anyone know what this param does? And is it required to track events?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
方法
参数特定于推荐的登录
事件。它告诉您用户用来登录哪种方法,例如凭据
或google-oauth
。因此,不需要(或适用)跟踪GA4事件的一般,并且不需要(但建议)登录
事件。( https://developers.google.com/tag-platform/gtagjs/gtagjs /参考/事件#登录)
在Ga-ua中,您可以控制类别的值, action , label (该行数据)(加自定义尺寸)。
示例:
登录
GA4中的Google
,您基本上可以控制行数据和列名。 (灰色字段可以设置为任何值)。
示例:
方法
FAILED_ATTEMPTS
...
登录
互动
2
...
方法
是Google推荐的参数之一,但是您也可以遗漏它,给它一个不同的名称或不同的名称或添加您认为有用的其他参数。The
method
parameter is specific to the recommendedlogin
event. It tells you which method a user used to log in, for examplecredentials
orgoogle-oauth
. Hence, it's not required (or applicable) to track GA4 events in general and it's not required (but recommended) for thelogin
event.(https://developers.google.com/tag-platform/gtagjs/reference/events#login)
In GA-UA you could control the values for Category, Action, Label (the row data) (plus custom dimensions).
Example:
Interaction
Login
Google
In GA4, you can basically control the row data and the column names. (Gray fields can be set to any value).
Example:
method
failed_attempts
...
login
Interaction
2
...
method
is one of Google's recommended parameters, but you could also leave it out, give it a different name or add other parameters that you deem useful.