方法在GTAG事件中是什么意思/做?

发布于 2025-01-25 08:04:40 字数 910 浏览 2 评论 0原文

我正在阅读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 技术交流群。

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

羁客 2025-02-01 08:04:40

方法参数特定于推荐的登录事件。它告诉您用户用来登录哪种方法,例如凭据google-oauth。因此,不需要(或适用)跟踪GA4事件的一般,并且不需要(但建议)登录事件。

名称类型必需的示例值描述
方法字符串Google用于登录的方法。

https://developers.google.com/tag-platform/gtagjs/gtagjs /参考/事件#登录


在Ga-ua中,您可以控制类别的值 action label (该行数据)(加自定义尺寸)。

示例:

类别操作标签
<代码>互动登录GA4中的Google

,您基本上可以控制行数据列名。 (灰色字段可以设置为任何值)。

示例:

事件名称方法FAILED_ATTEMPTS...
登录 互动>互动< /code>2...

方法是Google推荐的参数之一,但是您也可以遗漏它,给它一个不同的名称或不同的名称或添加您认为有用的其他参数。

The method parameter is specific to the recommended login event. It tells you which method a user used to log in, for example credentials or google-oauth. Hence, it's not required (or applicable) to track GA4 events in general and it's not required (but recommended) for the login event.

NameTypeRequiredExample valueDescription
methodstringNoGoogleThe method used to login.

(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:

CategoryActionLabel
InteractionLoginGoogle

In GA4, you can basically control the row data and the column names. (Gray fields can be set to any value).

Example:

Event Namemethodfailed_attempts...
loginInteraction2...

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文