简体   繁体   English

Google 标签管理器点击跟踪不起作用

[英]Google tag manager Click tracking not working

I am trying to do a simple tag that measures the amount of times an element is clicked.我正在尝试做一个简单的标签来衡量一个元素被点击的次数。

I got into difficulty so I looked to find a video to help because tag manager layout had changed.我遇到了困难,所以我想找一个视频来帮助,因为标签管理器布局已经改变。

I follow the following Free tutorial on Udemy我按照以下有关 Udemy 的免费教程进行操作

https://www.udemy.com/google-tag-manager-advanced/ https://www.udemy.com/google-tag-manager-advanced/

Specifically chapter 8 Button Click - which is a free chapter.特别是第 8 章 Button Click - 这是一个免费章节。 It tells me to setup the following options:它告诉我设置以下选项:

Tag Configuration:标签配置:

Google Analytics Tracking ID: {{Tracking ID}} Track Type: Event Category: Click Action: Homepage CTA Button Label: (blank) Value: (value) Google Analytics 跟踪 ID:{{Tracking ID}} 跟踪类型:事件类别:点击操作:主页 CTA 按钮标签:(空白)值:(值)

Then on the trigger:然后在触发器上:

Add a new one.添加一个新的。 Name it - click on homepage button命名 - 单击主页按钮

Add “Just Links”添加“仅链接”

He ticked the wait for tags他勾选了等待标签

The where it said “Enable this trigger when all of thee conditions are true” he selected他选择了“当所有条件都为真时启用此触发器”的位置

Page Path in the drop down menu.下拉菜单中的页面路径。

Now here is where my issue is.现在这就是我的问题所在。 When I do exactly the same thing, I only have the following options:当我做完全相同的事情时,我只有以下选择:

Google Analytics Settings Page Hostname Page Path Page URL Referrer New Variable… Google Analytics 设置页面主机名页面路径页面 URL 引用新变量...

Now the new Variable send to to a new window which gives me the following options:现在新变量发送到一个新窗口,它给了我以下选项:

Navigation: http referrer URL导航:http 引用 URL

Page Variables: 1st-Party Cookie Custom Javascript Data Layer Variable JavaScript Variable页面变量:第一方 Cookie 自定义 Javascript 数据层变量 JavaScript 变量

Page Elements: Auto-Event Variable DOM Element页面元素:自动事件变量 DOM 元素

Utilities: Constant Custom Event Environment Name Google Analytics Settings Lookup Table Random Number实用程序:常量自定义事件环境名称 Google Analytics 设置查找表随机数

Container Data: Container ID Container Version Number Debug Mode容器数据:容器 ID 容器版本号 调试模式

So how do I setup the trigger to load on every page and track if someone clicks on the element with a CSS ID of menu-item-6825???那么如何设置触发器以在每个页面上加载并跟踪是否有人点击了 CSS ID 为 menu-item-6825 的元素???

Totally lost on this one.完全输在了这一点上。

In your case you need:在您的情况下,您需要:

1) Go to "Variables" menu in the sidebar. 1) 转到侧栏中的“变量”菜单。

2) Click "Configure" 2)点击“配置”

3) Enable "Click Classes", "Click ID", "Click Element" variable 3) 启用“点击类”、“点击 ID”、“点击元素”变量

在此处输入图片说明

After this steps, you need to configure trigger and create condition: Click ID - equals - menu-item-6825 .完成此步骤后,您需要配置触发器和创建条件: Click ID - equals - menu-item-6825 OR condition like that: Click Element - matches CSS selector - #menu-item-6825 .条件如下: Click Element - matches CSS selector - #menu-item-6825 Both conditions are doing the same thing.两个条件都在做同样的事情。

it doesn't work with me for a specific button.它不适用于特定按钮。 for others button it works good.对于其他按钮,它效果很好。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM