Adding Google Analytics
-
Hi
I am new to WordPress and I am trying to add Google Analytics to my website, however, not sure where to add it. This is the information that I have been given:
Copy the following code, then paste it onto every page you want to track immediately before the closing </head> tag.<script type=”text/javascript”>
var _gaq = _gaq || [];
_gaq.push([‘_setAccount’, ‘UA-22510927-1’]);
_gaq.push([‘_trackPageview’]);(function() {
var ga = document.createElement(‘script’); ga.type = ‘text/javascript’; ga.async = true;
ga.src = (‘https:’ == document.location.protocol ? ‘https://ssl’ : ‘http://www’) + ‘.google-analytics.com/ga.js’;
var s = document.getElementsByTagName(‘script’)[0]; s.parentNode.insertBefore(ga, s);
})();</script>
I have tried to open the source page of the website, but I couldn’t seem to add any information into it.
Could someone please assist as I would like to get this working properly.
Thanks
The topic ‘Adding Google Analytics’ is closed to new replies.