首页 文章

为什么Google跟踪代码管理器不在某些网页上包含代码?

提问于
浏览
1

我有一个问题,在我的网站的某些页面上没有标签包含在GTM容器中 . 调试器显示:“容器中没有标签 . ”我现在已经尝试了几个星期才找到解决方案,但没有机会 . 我真的很感激任何想法!

我在所有网页上都包含了Google通用代码: url matches RegEx .*

通常在开始页面和其他一些页面上不包含任何标签: http://www.ailolaquito.com

在这样的其他页面上,标签通常包括在内: http://www.ailolaquito.com/en/activities/spanish-and-dancing

当我使用GTM预览和调试器工具时,它首先显示上面的消息,当我打开数据层选项卡并切换回标签选项卡时,突然显示所有标签 . 也许在某些页面上存在冲突(JavaScript?) .

我注意到,在不包含标签的所有页面上,Safari源视图中的HTML代码看起来都是压缩的:
Bad Code

在正确显示标签的页面上,html源代码看起来不错:
Nice Code

可能与此有关 . 但是我不明白为什么在某些页面上压缩源代码 . 它们都基于相同的布局模板 .

任何想法或帮助将不胜感激 . 我真的很想解决这个问题 .

非常感谢!

菲利普

P.S . :以下是一些截图:

GTM Tags

GTM Container OK

GTM Container not OK

1 回答

  • 0

    对于答案,请参阅Michael Philpott撰写的https://plus.google.com/102446957955231069158/posts/FetKoAh2JrD "there is a race condition that we are currently hunting down that when the debug script is cached you can see the no tags message. But if you click on any of the events and you can see what fired. Once you navigate to an event the summary tab will display correctly again. You can also force refresh the page which seams to fix this also."

相关问题