Description
Allows the user to opt out from Google Analytics.
Allows the user to opt out from Google Analytics.
Thank you for this nice job. It save a lot of Time for me. I would trie it in this week.
There is another way to do this, without having to edit the template.
Install spqr/assets.
Add https://www.googletagmanager.com/gtag/js?id=UA-123456-1 as URL using async to every page.
Add
as file or inline js to every page.
Add
<a href="javascript:gaOptout()">Disable tracking</a>
to your "privacy-policy"-page (or wherever you want to place it).
The extension spqr/googleoptout does all this without using the much larger extension spqr/assets, which could be a bit too much, if you only want to create an google analytics opt out.