SilverStripe 4 Module for adding a user prompt to request cookie consent.
Once installed, it needs to be activated in Settings, under the GDPR tab.
When the user changes their consent an event is fired.
If consent has been granted a "CookieConsentGranted" event will fire, if consent is not granted a "CookieConsentDenied" event will fire, so you can add event listeners for these.
Requires a Consent Initialisation tag to be added to GTM to work without any custom site code.
composer require timezoneone/silverstripe-gdpr-basics
<body>
<% if $GtmId %>
$gtmNoscript
<% end_if %>
- Download the TZO Silverstripe GDPR Basics Template
- Create a new GTM Tag Template
- Import the TZO Silverstripe GDPR Basics Template
- Save the Template
- Add a new GTM Tag
- Use the custom TZO Silverstripe GDPR Basics Tag Type
- Use a Consent Initialization Firing Trigger