服务器端GTM上的Adblockers问题
我正在使用服务器端GTM,但是当我要检索GTM?JS文件时,我正在呼叫以下请求时面临障碍问题:
https://example.gtmdomain.com/gtm.js?id=gtm-- my_gtm_id
当我不使用Adblockers时,请求正常。
有没有办法将终点重命名为其他东西,例如https://example.gtmdomain.com/secret_file_name.js?id=gtm-my_gtm_id
为了不被Adblockers阻止吗?
I am using Server side GTM, but I am facing adblocking issues when calling the below request when I want to retrieve the gtm?js file:
https://example.gtmdomain.com/gtm.js?id=GTM-MY_GTM_ID
The request works fine when I don't use adblockers.
Is there a way to rename the endpoint to something else, such as https://example.gtmdomain.com/secret_file_name.js?id=GTM-MY_GTM_ID
in order to not be blocked by adblockers?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
所以。服务器端GTM正是它所说的。它在服务器上执行。它听取网络请求。它没有任何接触前端发生的事情。前端没有任何线索,即服务器端GTM。好吧,除非有明确调用其端点,否则您可以在需要时与后端镜子代理。
您所经历的是Adblockers阻止您的前端GTM容器。尽管理论上可以跟踪您所需的一切,包括使用服务器端GTM的前端事件,但它被认为是使用GTMS和流前端事件通过前端GTM进行后端GTM的最佳实践。
当然,这会让您依赖Adblockers,因为它们会阻止您的前端GTM。避免这种情况的一种方法是...好吧,不要使用前端GTM,并且在没有阻止的标签管理器中实现了所有跟踪所有前端跟踪并将其发送到后端GTM进行正确处理和分发。
通常,没有TMS实施跟踪太贵了,因为现在您确实必须了解JS,因此只有很酷的孩子才能负担得起这样做。一个很好的例子是亚马逊。
基本上,没有TMS的实施跟踪的费用约为两到五倍(取决于细节),但是Adblockers通常只降低了约10%的流量。 10%对于报告,衡量Funnels的有效性以及什么不是至关重要。无论如何,分析都没有报告所有至关重要的数据。后端是关键数据的真正来源。
So. Server-side gtm is exactly what it says. It's executed on the server. It listens for network requests. It doesn't have any exposure to what happens on the front-end. And the front-end has no clue about there being a server-side GTM. Well, unless there are explicit calls to its endpoint, which you can proxy with your backend mirrors when needed.
What you experience is adblockers blocking your front-end GTM container. Even though it's theoretically possible to track all you need, including front-end events with server-side GTM, it's considered to be the best practice to use both GTMs and stream front-end events to back-end GTM through front-end GTM.
This, of course, makes you dependant on adblockers since they will block your front-end GTM. A way to avoid it is... Well, not to use the front-end GTM and have all your tracking implemented either in a tag manager that is not blocked (I doubt there is one) or just have your own custom javascript library doing all the front-end tracking and sending it to the backend GTM to be properly processed and distributed.
Generally, it's too expensive to implement tracking with no TMS, since now you really have to know your JS, so only the cool kids can afford to do this. A good example would be Amazon.
Basically, it would cost about two to five times more (depending on particulars) to implement tracking with no TMS, but adblockers typically cut only about 10% of traffic. 10% is not vital for reporting, measuring effectiveness of funnels and what not. All the critically important data is not being reported on by analytics anyway. Backend is the real source of critical data.
如果您使用
更多信息 https://stape.io/blog/blog/avoiding-ingog/avoiding-ingog- Google-Tag-Manager-Blocking-by-Adblockers
您还可以为Web GTM创建自定义加载程序客户端。但是,相关脚本会有问题。那时仍然会阻止ua/ga4,但GTM本身并没有被阻止。
You can easily do this if you use sGTM hosting from https://stape.io
There is a feature called Custom Loader. With it, you can download Web GTM from different paths and all other related scripts will be also downloaded from different URLs, for example, gtag.js for GA4.
More info https://stape.io/blog/avoiding-google-tag-manager-blocking-by-adblockers
You can also create your custom loader client for Web GTM. However, there will be problems with related scripts. UA/GA4 still will be blocked then, but GTM itself not.
因此,我终于使用GTM客户端模板实现了一个很好的解决方案。它就像魅力一样。
总而言之,这些步骤是:
完美地解释了必需的步骤:< a href =“ https://www.simoahava.com/analytics/custom-gtm-loader-server-sider-side-tagging/” gtm-loader-side-side-tagging/
So, I finally implemented a great solution using GTM client templates. It works like a charm.
To summarize, the steps are:
This article explains perfectly the required steps: https://www.simoahava.com/analytics/custom-gtm-loader-server-side-tagging/