-
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 API - Analytics code not showing up in page source, thus no data #2518
Comments
Anybody? This is urgent, please |
@SidneyBilliet thank you for reporting, we have created MAGETWO-46264 to investigate. |
Any news on this? |
Hi @SidneyBilliet , seems like issue cannot be reporoduced on fresh magento version, please check it, and if you think that not, feel free to write here or to open new one |
We also run into this with Magento 2.1.0 This is caused by the setting: General => Web => Default Cookie Settings => Cookie Restriction Mode => Yes While it's questionable if this setting should disable outputting the Google Analytics code, you would expect that when you accept the cookie message, the GA code appears on the page. But that isn't the case. @vzabaznov: I think you should reopen this after you verified my above statement also triggers this bug on a clean Magento installation (which I haven't tested yet). |
We can verify that it doesn't work in our case with a composer installed 2.1.0, but setting General => Web => Default Cookie Settings => Cookie Restriction Mode => No does not have any effect... |
Hi, I have a issue with analytics. When I checked the console, it shows a sintaxys error, becouse missing a " ' ", you can add in block on "code/Magento/GoogleAnalytics/Block/Ga.php" on line 83, there miss a single colon. Hope this help some one. |
Inspite having set the UA code in the Google API config settings via the backend, no data is showing up in Analytics. When inspecting the page source there is no analytics script present.
<script> (function(i,s,o,g,r,a,m){i'GoogleAnalyticsObject'=r;ir=ir||function() { (i[r].q=i[r].q||[]).push(arguments)} ,ir.l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)0;a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-xxxxxxxx-x', 'auto'); ga('send', 'pageview'); </script>
The text was updated successfully, but these errors were encountered: