How to block user tracking by Google (Maps, Analytics, Youtube)?
When you have Google products, such as Google Maps, Google Analytics, or Youtube, present at your website, these Google products could have so-called third-party cookies. In order to be compliant with privacy laws, you should either:
- Get a user's consent and use third-party cookies;
- Block third-party cookies.
1. Using third-party cookies
If you want to use third-party cookies, you have to inform your website users about third-party cookies and get a user's consent to collect their personal data.
Read more here about cookies consent management.
2. Blocking third-party cookies
If you want to block third-party cookies, you should change the setting of these products.
Google Analytics settings could be managed through Google Consent Mode.
If you want to add Youtube videos without cookies to your website, a privacy-enabled mode should be used. The code for the embedded video will change from “www.youtube.com” to “www.youtube-nocookie.com”. This prevents videos watched on your website from impacting users’ experiences on YouTube. Please see more information about Youtube videos without cookies.
As for other less popular tools, you can either check those tools' documentation or just block those tools completely before consent is given as described below.
See more information about blocking third-party cookies manually.
See more information about blocking third-party cookies automatically.