Which Code is the right one?
-
Hello,
we experience problems with Google Analytics and the plugin.
Google Support told us that the (UA?)Code is not there or not right.
In our WebSite we can see
<script>
jQuery(document).ready(function () {
jQuery.post(‘https://www.oursite.de?ga_action=googleanalytics_get_script’, {action: ‘googleanalytics_get_script’}, function(response) {
var F = new Function ( response );
return( F() );
});
});
</script>This probably creates the following code:
(function() { (function (i, s, o, g, r, a, m) { i[‘GoogleAnalyticsObject’] = r; i[r] = i[r] || function () { (i[r].q = i[r].q || []).push(arguments) }, i[r].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’, ‘https://google-analytics.com/analytics.js’, ‘ga’); ga(‘create’, ‘UA-12345678-1’, ‘auto’); ga(‘send’, ‘pageview’); })();
…and this is almost the right code for Google Analytics.
However, it is not as Google recommends it:
<script>
(function(i,s,o,g,r,a,m)
…
</script>Could it be that this is somehow seen as “wrong” by Google?
Thanks!
- The topic ‘Which Code is the right one?’ is closed to new replies.