简体   繁体   English

当我尝试使用Google跟踪代码管理器进行跟踪时,为什么出站链接在Google Analytics(分析)中等于“(未设置)”?

[英]Why is the outbound link equal to “(not set)” in Google Analytics when I try to track it using Google Tag Manager?

Using Google Tag Manager, I have set up a trigger/tag configuration to track the originating page URL and referring page URL on an outbound link click. 使用Google跟踪代码管理器,我已经设置了触发器/标记配置,以跟踪出站链接点击中的原始页面URL和引荐页面URL。

触发配置

标签配置

When I view the Events data in Google Analytics, all of the originating page URLs are tracked but half of the Event Labels (which should contain the referring page URL or Click URL in the terminology of GA) are equal to (not set) . 当我在Google Analytics(分析)中查看“事件”数据时,将跟踪所有原始页面URL,但一半的事件标签(在GA术语中应包含参考页面URL或Click URL)等于(未设置)

I thought that this might be happening because the GTM code did not always have a sufficient amount of time to load so I checked "Wait for Tags" but this did not seem to have any effect (note that when I checked "Wait for Tags", I had to enable a trigger condition so I set it such that the Click URL does not equal the gibberish string that you see in the screenshot). 我认为可能会发生这种情况,因为GTM代码并不总是有足够的时间加载,因此我选中了“等待标记”,但这似乎没有任何效果(请注意,当我选中“等待标记”时, ,我必须启用触发条件,因此我将其设置为“点击URL”不等于您在屏幕快照中看到的乱码)。

Does anyone have any idea what might be happening here? 有谁知道这里会发生什么?

"Wait for Tags" is unlikely to come into play here. “等待标签”不太可能在这里发挥作用。 Were there a delay in the tag firing, you'd see no data in Google Analytics for that event at all. 如果代码触发延迟,您将在Google Analytics(分析)中看不到该事件的任何数据。

It sounds like you might have some links in your pages that don't have the href attribute set on them. 听起来您的页面上可能有一些链接,这些链接上没有设置href属性。 In this situation, the {{Click URL}} would be an empty string, leading to the label getting the "(not set)" value in the Google Analytics reporting. 在这种情况下,{{Click URL}}将为空字符串,导致标签在Google Analytics(分析)报告中获取“(未设置)”值。

Consider adding a condition on your trigger to assert that the {{Click URL}} must be a valid URL (for example, starts with "http"). 考虑在触发器上添加一个条件,以断言{{Click URL}}必须是有效的URL(例如,以“ http”开头)。

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

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