ott-web-app
ott-web-app copied to clipboard
Feat: cookie banner and defer GTM load
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