Google Tag Manager服务器端GTM.JS返回404

发布于 2025-01-31 05:56:04 字数 1102 浏览 2 评论 0原文

我创建了一个新的服务器端GTM容器,设置Google App Engine,添加了GTM客户端,并将所有内容都部署。但是,当我检查容器的gtm.js时,文件返回404。

因此,我使用自动配置创建了应用程序引擎实例,它返回ok ok /Healthy路径。

GTM容器已发布并具有活动的标签和触发器。这是GTM客户端的屏幕截图。

我将此摘要添加到我的网站上:

<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://gtm-p3vlp32-ndhiz.uc.r.appspot.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-P3VLP32');</script>
<!-- End Google Tag Manager -->

然后在“网络”选项卡中获得此错误。我是否错过了一个步骤来返回gtm.js文件?

I created a new Server-side GTM Container, set up Google App Engine, added a GTM Client, and have everything deployed. However, when I check the gtm.js for the container the file returns a 404.

So I created the the App Engine instance using the automatic configuration and it returns ok for the /healthy path.

The GTM container is published and has an active tag and trigger. Here is a screenshot of the GTM Client.
enter image description here

I have this snippet added to my site:

<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://gtm-p3vlp32-ndhiz.uc.r.appspot.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-P3VLP32');</script>
<!-- End Google Tag Manager -->

Then I get this error in the network tab. Did I miss a step to get the gtm.js file to be returned?

enter image description here

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

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

发布评论

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

评论(1

沧桑㈠ 2025-02-07 05:56:04

我认为您尚未将域设置为GTM服务器端。在“管理员”选项卡中,在容器设置上,转到“服务器容器URL”,然后将域放置在GTM服务器端的位置。

I think you haven't set up the domain to your GTM Server side. In the Admin tab, on container settings, go to "Server Container URL" and put your domain where your GTM Server Side is located.

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