---
Module Directory: https://modules.processwire.com/modules/privacy-wire/
Github: https://github.com/blaueQuelle/privacywire/
Packagist:https://packagist.org/packages/blauequelle/privacywire
Module Class Name: PrivacyWire
Changelog: https://github.com/blaueQuelle/privacywire/blob/master/Changelog.md
---
This module is (yet another) way for implementing a cookie management solution.
Of course there are several other possibilities:
- https://processwire.com/talk/topic/22920-klaro-cookie-consent-manager/
- https://github.com/webmanufaktur/CookieManagementBanner
- https://github.com/johannesdachsel/cookiemonster
- https://www.oiljs.org/
- ... and so on ...
In this module you can configure which kind of cookie categories you want to manage:
You can also enable the support for respecting the Do-Not-Track (DNT) header to don't annoy users, who already decided for all their browsing experience.
Currently there are four possible cookie groups:
- Necessary (always enabled)
- Functional
- Statistics
- Marketing
- External Media
All groups can be renamed, so feel free to use other cookie group names. I just haven't found a way to implement a "repeater like" field as configurable module field ...
When you want to load specific scripts ( like Google Analytics, Google Maps, ...) only after the user's content to this specific category of cookies, just use the following script syntax:
<script type="text/plain" data-type="text/javascript" data-category="statistics" data-src="/path/to/your/statistic/script.js"></script>
<script type="text/plain" data-type="text/javascript" data-category="marketing" data-src="/path/to/your/mareketing/script.js"></script>
<script type="text/plain" data-type="text/javascript" data-category="external_media" data-src="/path/to/your/external-media/script.js"></script>
<script type="text/plain" data-type="text/javascript" data-category="marketing">console.log("Inline scripts are also working!");</script>
The data-attributes (data-type and data-category) are required to get recognized by PrivacyWire. the data-attributes are giving hints, how the script shall be loaded, if the data-category is within the cookie consents of the user. These scripts are loaded asynchronously after the user made the decision.
If you want to give the users the possibility to change their consent, you can use the following Textformatter:
[[privacywire-choose-cookies]]
It's planned to add also other Textformatters to opt-out of specific cookie groups or delete the whole consent cookie.
You can also add a custom link to output the banner again with a link / button with following class:
<a href="#" class="privacywire-show-options">Show Cookie Options</a>
<button class="privacywire-show-options">Show Cookie Options</button>
I would love to hear your feedback ?
CHANGELOG
You can find the always up-to-date changelog file here.