PHP cookie checker for Google Analytics, Tawk.To, Smartsupp and HotJar (GDPR Compliance)
This small class will add a cookie toggle window to any website.
To add this functionality within a site simply follow the below steps :
-
Upload the entire dsmCookie folder into the public_html (or similar) root folder of your website.
-
If done correctly you will then be able to visit [domain]/dsmCookie/install-check.txt and see the "Installed correctly" message.
-
Then add the following code at the very end / just before the closing body tag of each page:
<?php require_once $_SERVER['DOCUMENT_ROOT'].'/dsmCookie/output/scwCookie.php'; ?>
-
Rename config.example.ini to config.ini
-
Then open config.ini in your chosen editor and set the values to match your site configuration
Thats it, a window will now display in the footer of your site allowing people to manage the cookies you use.
A live example is available here: https://dsmdesign.co.uk
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
The MIT License (MIT). Please see License File for more information.