如何在自定义HTML标签中获取GTM标签名称

发布于 2025-01-23 17:03:51 字数 167 浏览 1 评论 0原文

是否可以进入变量GTM标签名称? 我想在控制台中查看触发标签的标签名称:

gtm tag名称chtml标签屏幕截图

alt =”

“”

Is it possible to get in a variable the GTM tag name?
I would like to see in the console the tag name of the tag triggered:

GTM Tag Name inside cHTML tag screenshot

I have found the variable exists on the google_tag_manager object called instance name:

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

两仪 2025-01-30 17:03:51

gtm监视API 公共Beta中的API 。您可以使用它来获取射击标签名称。我怀疑您引用的对象是否有射击标签的实际日志。更像容器中所有标签的列表。监视API可能是您可以轻松获得射击标签名称的最接近。

Simo的文章也可能很方便。在他的示例中,他将大查询用作目的地,但很容易修改。

There's the GTM Monitoring API in public beta. You could use it to get fired tag names. I doubt the object you referenced has the actual log of fired tags. More like the list of all tags in the container. Monitoring API is probably the closest you can get to the fired tag names easily.

This article from Simo could be handy too. He's using Big Query as a destination in his example, but it's easy to modify to whatever.

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