In the Settings of a Google Site, it's possible to enable analytics and add Google Analytics 4 using a measurement ID. My concern is about the cookie consent dialog. For people accessing from the European Union, according to GDPR and ePrivacy Directive, just informing about the use of cookies and setting Google Analytics 4 cookies without prior consent doesn't comply with the law. These cookie shouldn't be set until the user opts-in. I expected this issue would be something already solved, but it isn't. I don't know if it's possible or how to request this feature, or if there is any built-in way in Google Sites to enhance the cookie consent to work similarly as the behaviour of Consent Management Platforms regarding cookies.
2 Answers
There is no way to do this. Because of the way GA works, and its relationship with Google in the US, it's not possible to even load the script while remaining compliant with EU law (because the loading of the script provides identifiable tracking information to Google). As a result, it makes no difference what settings are available within the script, because it's already illegal before they can have any effect. Remember that the EU laws apply not only to cookies, but to any mechanism that facilitates tracking, which includes script downloads.
I recommend that you either skip client-side tracking scripts altogether (you can do 90% of the same things without it), or switch to a privacy-preserving (or at least EU-hosted) analytics platform such as Fathom or Matomo.
Probably never. As of today, Google services are not considered EU GDPR compliant by EU authorities. If personal data is collected with GA a privacy breach occurs under the EU GDPR from a technical perspective. Further reading: https://piwik.pro/blog/is-google-analytics-gdpr-compliant/
Moreover, regulations governing cookies are split between the GDPR and the ePrivacy Directive. Further reading: https://gdpr.eu/cookies/
-
This does not provide an answer to the question. Once you have sufficient reputation you will be able to comment on any post; instead, provide answers that don't require clarification from the asker. - From Review Commented May 26, 2023 at 9:58
-
QUESTION: When cookie consent for Google Analytics 4 in Google Sites will be enhanced to comply with European Union legislation? ANSWER: I don't believe Google services can be considered EU GDPR compliant. Ref: piwik.pro/blog/is-google-analytics-gdpr-compliant? The answer is in the contest. Likely Google Analytics and all othe Google services would never be EU GDPR compliant. Commented May 26, 2023 at 11:36