Thanks again, Adam. Your description is perfectly working. In my case, the problem was the GA Tag. Although I tried to follow all explanations in your link to Wix Support (Setting Up Google Analytics Using Google Tag Manager | Help Center | Wix.com), these settings dind’t activate GA. For me, the solution was to define the GA Tag like documented here (in German): Google Tag Manager Tutorial II: Google Analytics einbinden | Bloofusion Blog . After doing so, it runs like it should.
Hi Thomas,
I’m glad to hear its working.
The only thing to double check is that you are triggering a pageview event for every navigation.
The built-in ‘All Pages’ GTM trigger might not function correctly and we recommend using the custom trigger I showed in my original reply.
In any case, GTM is very flexible and you can probably achieve the same result using different setups. As long as your setup is tested, you should be good to go.
Thanks,
Adam
Thanks for that information, Adam. I’m going to check that again within the following days. Regards, Thomas
With this method the user is opted out only for one session. When the user visits the website another time again, the user is automatically tracked again. Is it also possible to make the user opt out permanently?
As the new law is for all europe, it would be really great to have a function / app / whatever for it.
The new law is not only google analytics… It is actually insane!
About this crazy law dear people.
I have an idea!!!
I think this law is putting small firms, artists and so on under a huge pressure. Everybody around me is fighting with this absurd new regulation… It is so complicated, most of us cannot handle it.
Already some clever people offer a “safe website rebuild” for money. Soon lawyers will have a lot of new customers from people who could not satisfied this agressive law. Even if they try! The fine will be very high, I heard… Photographers are having their daily bread in danger. Unless you have a press card you cannot fotography in the streets anymore. Only the mainstream press can!!! That is a real threat to our freedom of expression.
My idea:
Creating a site, where people can suscribe if they want to be part of the “solidarity group”.
If someone in the group get a fine, the all group share the costs of a lawyer.
→ If we do well, we can find 2 or 3 intelligent lawyers who have a bit left for justice and freedom in the internet! These people could work with the group regularly and possibly have lower money expectation.
→ We can also exchange advice about how to more or less follow the law.
→ People feel less stressed! The fear of the fine is not so strong.
→ Not accepting every thing the more and more controlling system wants from us!
→ We can rescue street fotografy and generally our freedom of expression and opinion!
If anybody here is interested to help me build a site, please contact me.
I’m a french artist living in Berlin.
www.baerensuppe.berlin
Bilbo
Hi, this still isn’t working for me. I’ve followed all the steps carefully and checked them. The Opt Out function isn’t working! Can anyone see what’s wrong?
I’ve applied all of this to a lightbox. The ‘Opt Out of GA’ with the line under it is indeed the main lightbox button which everything should be linked to and matches the code as per the tutorial.
Hi Joe,
The best way to discover problems in your setup is to use the Preview tool offered by Google Tag Manager.
You can learn more about it here - Preview and debug containers - Tag Manager Help
Once you open your site with the preview tool, it will show you what GTM sees after every interaction you make with the site. Inside the preview tool you can see what triggers were activated after each interaction with your page and what tags were fired based on these triggers.
If your Google Analytics tag is not firing when you expect it to fire, the preview tool can help you understand why.
If you need any further assistance, please share your site URL here. Just keep in mind that since Google Tag Manager and Google Analytics are external tools, our ability to assist in debugging issues inside them is limited.
Thanks,
Adam
Hi Adam,
I tried setting everything up as you suggested but it didn’t work without some adjustments. In your setup you are checking for the opt-out cookie but you never set it as far as I can see.
Here’s my code in the “Disable GA” tag:
<script>
window['ga-disable-{{Universal Analytics ID}}'] = true;
alert('You successfully disabled tracking via Google Analytics. \nSie haben sich erfolgreich von der Nachverfolgung durch Google Analytics abgemeldet. ');
var disableStr = 'Opt-out Cookie';
document.cookie = disableStr + '=true; expires=Thu, 31 Dec 2099 23:59:59 UTC; path=/';
window[disableStr] = true;
</script>
Hello Adam, Hello all the others,
First of all, thank you for your great help!
But I have one more problem…
I implemented everything like you said.
Now, if I click on the button “Deactivate GA etc…” on my website, I see that the trigger in GTM is activated and the Tag “Deactivate GA” with the code (see below) works.
And yes, the variable for “GA ID” is my Tracking Code, I implemented that as well…
BUT: In the Realtime view of Google Analytics I can see all my activities, eventhough I clicked that button to deactivate the Google Analytics Tracking…
And I am sure that the Trigger works, and I know that this trigger activates the Tag (‘ga-disable’- etc.)…
What am I doing wrong here?
I hope, Adam or someone else can help me here…
Thank you in advance and best regards from Germany
Simon
Hi Simon,
try using this as your disable script:
And these must be set accordingly:
Note that the changes might only take effect after reloading (which my script does automatically).
You will also probably not see an immediate effect in Google Analytics. But if you reload again after a while you shouldn’t show up anymore.
Hey Jonas,
thank you so much for your answer…!
Im so impressed from all of your knowledge… Im not this kind of IT-Guy you know…
This is all new for me…
Thank you so much!!
Simon
Hey Adam, boy your´re amazing. I just created an account to tell you that I´m so thankfull for you post. I did everything you wrote and it works!! Perfect. I´m here in Germany and this topic is really important, so thanks a lot!!
Hi Adam, great article!! All executed and almost there, but once I click on the Opt out text on my website, there is no deactivation visible in Google Analytics Real Time. Any ideas where I should check for the mistake?
My “Deactivate GA” button is not firing. Any ideas how to find the root-cause?
Big Thanks in advance