Search code examples
javascriptjqueryrequestprivacy

How to block/break/disable a request from a third-party tool?


I am not a professional and it is my first small project to create a website.

I use different tools/widgets from third party providers. For example a booking system. My problem is that the third party tools (like the booking system) send the data (e.g. IP address) to Google (Google Tag Manager) or to Matomo (Tracking Tool). For example I see this through the network analysis (see screenshot).

enter image description here

My question: Can I write a script that cancels/blocks/disable these requests? It is best if the script is compatible to all browsers. I think it should be possible or? I mean, there are extensions like Ghostery that block these requests (especially also this Google Tag Manager Request, when I enable ghostery).

Why do I need this? I live in Germany and here is the GDPR (= General Data Protection Regulation). This means that no personal data (like IP address) may be sent to external servers without permission.


Solution

  • Google Tag Manager is indeed a problem because it sends data to the US, and that's no longer legal since the collapse of privacy shield and SCCs to the US. The only way to avoid that is not to use GTM. Google analytics is just as bad, and you should consider Google Fonts to be a tracking mechanism too.

    GTM and GA's "GDPR compliance" options are a waste of time. They do nothing until after their scripts have loaded, by which time the damage has already been done. Just don't use them.

    Matomo is a different matter, because it's usually self-hosted and so is not sending data to anyone but yourself. That said, it usually does so via a javascript tracker plugin, and may set cookies. However, it will also work purely with log analytics which require neither of those things.

    Seek out services that do preserve privacy; they exist.