Google Tag Manager服务器端GTM.JS返回404
我创建了一个新的服务器端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.
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为您尚未将域设置为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.