-
-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Google Analytics cookies still remain after Rejecting All Cookies #73
Comments
How did you add it? |
I don't see the GTA code when I view the source. Are you looking at the home page of: https://www.sheffieldmca.org.uk ? This is the code I added: <script src="https://cdn.jsdelivr.net/gh/manucaralmo/GlowCookies@3.1.7/src/glowCookies.min.js"></script> <script> glowCookies.start('en', { style: 1, analytics: 'G-GG3YDDC3KH', bannerDescription: "We use our own and third-party cookies to personalise content and to analyse web traffic.", hideAfterClick: false, policyLink: '/cookies' }); </script> |
Sorry, was my mistake. I have just tested it again and the GTM code does not fire if the cookie banner is shown. After a reload of the page it works and the GTM code is not fired again. |
so do you think there's a bug in the GlowCookie system? How can the GTM code appear if I haven't added it in the first place? |
Yes I think this could be a bug, but I wonder because this does not happen on my website I have added this script. |
@manucaralmo would you be able to look at https://www.sheffieldmca.org.uk to see if GlowCookie is working for you? Can you choose to reject all cookies and then see if they are being blocked when you refresh the page? Thanks |
@sensibleandy After refresh GA is blocked. But after clicking on "reject" GA will be loaded once. |
Which browser are you using? Sometimes it seems to work properly and then other times it doesn't work properly. |
I use Chrome browser. |
Hi guys, I found out where the problem comes from. I had to take a look into the GlowCookies JS. The problem is caused by the disableTracking() function, which is also injecting Analytics. I removed this highlighted line as you can see in the screenshot. After that it works as expected. Tested and it works in both cases (accept/reject). Didn't go deeper but I guess there is a logical gap with this.tracking.AnalyticsCode which has to be fixed. |
@manucaralmo will you be updating the javascript as a result of what @ra7khan found? |
Does this even work at all? It keeps letting the cookies be initialized even if I reject and reload. I've also tried commenting the code demonstrated above by @ra7khan. Anyone has a good alternative in mind? |
I found the solution that civicuk.com provide is the best at managing the cookies. The free version works fine! |
you need to edit glowcookies.js disableTracking() function and add the following code: here is the full function:
ive tested and i can confirm that GA will no longer use a cookie once this is done |
Hi,
I've added your script to our web site - https://www.sheffieldmca.org.uk
However if I choose to reject all cookies I can still see the GA cookies listed when I reload the pages.
Can you help please?
Andy
The text was updated successfully, but these errors were encountered: