Complianz - markhowellsmead/helpers GitHub Wiki
Complianz is a third-party solution and plugin for WordPress which allows the easy addition of a decent and configurable cookie banner to a website.
Adding custom scripts
For example, Google Tag Manager or GTM. You can usually allow Complianz to do its thing by using it to add GTM to the site. However, this only works if you are only using GTM and no other statistical plugin. If you already have e.g. Matomo in place, then you'll need to add the JavaScript manually.
Do so through the Integrations » Script Center: add a new third-party script entry, name it Google Tag Manager and assign it the category Statistics. The script added here should be JavaScript only (no HTML tags). To check it's working and only running when the Complianz agreement cookie has been set, add a console.log
to the JavaScript, which will then appear in the console.