Google标签管理器破坏了产品

发布于 2025-01-18 19:24:06 字数 312 浏览 1 评论 0原文

我已经使用GA4使用GTM了几个星期,没有太多问题来跟踪我的公司网站上的各种指标。我过去在当地,开发环境和我们的产品环境中有GTM和GA4工作。在将更新从开发人员推向产品之后,GTM破裂了,不会连接到POR网站。我得到的唯一错误是GTM无法加载的404。相同的代码在本地和开发站点上都可以正常工作,此错误仅在产品上发生。我知道我的GTM已出版,但我不知道为什么它打破了我们的产品网站。我找不到许多相关的答案,不仅说“发布您的标签经理”。

我已经检查并重新检查了开发人员和本地站点。我已经检查了GTM已发布。只有在产品中,我才能在连接到GoogleTagmanager.com时才会获得404错误。

I have been using GTM with GA4 for a few weeks now without much issue to track various metrics on my companies website. I have had GTM and GA4 working in the past locally, in our dev environment, and within our prod environment. After pushing updates from dev to prod, GTM has broken and will not connect to the prod website. The only error that I get is a 404 that GTM could not load. The same code is working locally, as well as on the dev site, this error only occurs on prod. I know my GTM is published, but I don't know why it has broken our prod site. I can't find many related answers that don't just say "publish your tag manager".

I have checked and rechecked the dev and local sites. I have checked that GTM is published. It is only within prod that I get the 404 error while connecting to googletagmanager.com.

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

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

发布评论

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

评论(1

高速公鹿 2025-01-25 19:24:06

是的,当容器未发布时,通常会收到 404 错误。

然而,在您的情况下,可能会忘记将 GTM 脚本包含在您的 CSP 中。

确保代码中的 GTM ID 正确。

yes, usually you get a 404 when the container is not published.

In your case, however, it may be something like forgetting to include the GTM script in your CSP.

Make sure you have the correct GTM id in your code.

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