服务器端GTM上的Adblockers问题

发布于 2025-02-04 15:59:25 字数 289 浏览 4 评论 0原文

我正在使用服务器端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 技术交流群。

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

发布评论

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

评论(3

装纯掩盖桑 2025-02-11 15:59:25

所以。服务器端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.

骄傲 2025-02-11 15:59:25

如果您使用

更多信息 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.

三生一梦 2025-02-11 15:59:25

因此,我终于使用GTM客户端模板实现了一个很好的解决方案。它就像魅力一样。

总而言之,这些步骤是:

  1. 从服务器容器中创建客户端模板。您可以从 https:// raw.githubusercontent.com/gtm-templates-simo-ahava/gtm-loader/main/template.tpl
  2. 从此客户端模板
  3. 名称您的路径时,请按照您的要求

完美地解释了必需的步骤:< 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:

  1. Create a client template from your server container. You can import this template from https://raw.githubusercontent.com/gtm-templates-simo-ahava/gtm-loader/main/template.tpl
  2. Create a new client from this client template
  3. name your path as you want

This article explains perfectly the required steps: https://www.simoahava.com/analytics/custom-gtm-loader-server-side-tagging/

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