Adding Google Analytics to your wordpress

So last night I decided to add the Google Analytics to my blog and see what the most rewarding post/s.

1. Visit www.google.com/analytics to sign up with your Google Account.

2. You need to accept some T&A before continuing the process.

3. Add a new Website, enter your domain name.

4. Now, Google will generate a tracking code for you to input into your webpage.

Something like this,

<script>
(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’,’//www.google-analytics.com/analytics.js’,’ga’);

ga(‘create’, ‘XXXXXXXXX’, ‘auto’);
ga(‘send’, ‘pageview’);

</script>

 

To insert that into your wordpress blog, use the following plugin, https://wordpress.org/plugins/insert-headers-and-footers/

GoogleAnalytics

Leave a Reply

Your email address will not be published. Required fields are marked *