-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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 Universal Analytics does not track when Cookie Restriction is enabled #5596
Comments
Same problem here. This needs to be reviewed why is not injecting the google analytics code... |
Same here. The Analytics Code is just missing in the source code of the rendered page. A fix would be highly apperciated! |
A quick fix is to copy the file: And then replace this line: <?php if (!$this->helper('Magento\Cookie\Helper\Cookie')->isUserNotAllowSaveCookie()): ?> with: <?php if (true): // !$this->helper('Magento\Cookie\Helper\Cookie')->isUserNotAllowSaveCookie()): ?> Watch out, this will always output the GA code, even if the user hasn't accepted the cookie message. I'm ok with this, but you should probably check with your legal departement if this is ok to do or not. |
@hostep - your fix is working... THX |
Confirmed here. We need the cookie allow feature thats why using true doesn't work for us. The root cause for this problem lies in |
Isn't this in breach of the EU cookie law? Web owners can remove the check themselves, but I don't think Magento should do it. |
This is still a problem. Any progress? |
Still issue in latest version. @hostep fix works. But now its more a cookie notice, not restriction. |
Reopening, as fix for |
Is this resolved yet? I'm creating a store in EU and I'm running into the same problem with Magento 2.1.7. |
@storepeinture Looks like the fix is currently available only in the |
@ishakhsuvarov I applied the stringify change specified in commit a4daf56 but it still does not work. |
@coachdesign You may also try to apply PR #9711 |
I can confirm this is, again, not implemented in 2.1.7. Reported over one year ago - and not fixed. 5 shops left on magento2 for our company - 13 switched and running now on other ecommerce systems at the moment as the magento team does not get the job done in fixing bugs since over one year. |
It will never be fixed in any future 2.1 release. 2.1 receives only security fixes. |
@SchumacherFM: can you please stop spreading such news, this is definitely not true. 2.1 still receives bug fixes, just look at what's going on on the 2.1.8-preview branch, you'll see a lot of bug fixes. They just need to start releasing it very soon as it has been almost 4 months since the last bugfix release... |
Hi @andidhouse If you find a way to simplify the css let me know :) |
Internal ticket to track issue progress: MAGETWO-69374 |
I've published a module https://github.com/magma/magento2-cookie-restriction-fix while we are waiting for a fix. It just replaces notices.js. |
I've upgraded to Magento 2.2.1 but the problem still persists. |
Hi Guys i have edited a little bit the fix of @hostep to be 100% sure that your Customers will not see Google Analytics if they have not accepted cookies. An easy fix is to copy the file: And then replace this line:
Under google analytics |
Im using Magento 2.2.2 and i can confirm this problem still exist so why the label that it's fixed in 2.2?x?! |
@ NickyBass Can you tell if magento 2.2.2 this file:
Also if you look at magento core file here : https://github.com/magento/magento2/blob/2.2-develop/app/code/Magento/GoogleAnalytics/view/frontend/templates/ga.phtml The if statement doesn't exist. The cookie Thanks; |
@lano-vargas The fix i wrote was good for 2.1.x actually i don't have a solution for 2.2.2 i think the problem is varnish or the cache. |
I have the same problem on 2.2.2. Any solution? |
Have a related problem. My understanding is that GA doesn't need to be blocked in cookie restriction mode if you turn off data sharing, anonymize the IP, disable user ID function, disable sharing for ad purposes. So how can I stop Magento 2.2.5 blocking GA in cookie restriction mode? |
In notice.phtml helper(\Magento\Cookie\Helper\Cookie::class)->isCookieRestrictionModeEnabled()): ?> getPrivacyPolicyLink()); ?> and in ga.phtml
|
Steps to reproduce
composer
.(https://chrome.google.com/webstore/detail/google-analytics-debugger/jnkmfdileelhofjcijamephohjechhna?hl=en) or view live tracking results in the Google analytics control panel.
Expected result
e.g.
and
Live Page tracking statistics to change in Google Analytics Web Console
Actual result
NB. This case is a duplicate of a closed but unresolved case: #2518
The text was updated successfully, but these errors were encountered: