ott-web-app icon indicating copy to clipboard operation
ott-web-app copied to clipboard

Feat: cookie banner and defer GTM load

Open ChristiaanScheermeijer opened this issue 1 week ago • 1 comments

Description

This PR introduces an optional Cookie banner when using GTM. It is possible to only load the GTM script when the user accepts the cookie/privacy policy to be (GDPR) compliant.

The same applies to the Google ReCaptcha, which uses a cookie to identity the user.

This can be configured using build environment variables:

APP_CONSENT_COOKIE_NAME=iaccept
APP_CONSENT_COOKIE_POLICY_URL=https://policy.yoursite.com
APP_GTM_TAG_ID=GTM-123456-4
APP_GTM_TAG_SERVER=https://gtm.yoursite.com
APP_GTM_LOAD_ON_ACCEPT=true
Screenshot 2025-02-17 at 17 04 44

ChristiaanScheermeijer avatar Feb 17 '25 16:02 ChristiaanScheermeijer