Add Google Analytics in wordpress
There are two ways to install Google Analytics tracking code in Wordpress theme.
1. Editing Theme in Word press
*Login in through wordpress admin panel
*Go to Appearance Editor (theme editor)
*Select the footer.php or index.php
**Select header.php
*Find the
**Find the
*Copy and paste the Google Analytics code before the < /body>tag i.e just above < /body> .
**Copy and paste it into your web page, just before the closing
*Click Update File to save changes.
* Now open your blog and view source to see Google Analytics code in wordpress
*If you have changed your wordpress blog theme, you need to repeat above process.
*Make sure you select ga.js Google Analytics Code
2. Using a Plugin in Wordpress Blog to Add Google Analytics Tracking Code
Use this plugin WP Google Analytics
There are many plugins that can help you do this.
Search for More Google Analytics Wordpress Plugin here (external Link to wordpress)- simply type Google analytics and click seach plugin
Important Note:
The only problem with the manual installation is that if you change wordpress themes you will loose your Google Analytics tracking. That is why it is better to handle the Google Analytics tracking code within a plugin. The selected plugin is a simple plugin which remain same even when you change the theme
However if you are not much aware of wordpress Plugin then use manual installing of Google Analytice code. When you change the wordpress theme you can again follow manual procedure for adding Google Analytics Code in your wordpress blog
My advice is to add Google Analytics Code wordpress blog manually. One important reason to do this is, when you update your wordpress version, it may not support that plugin immediately.
Still having confusion with How to install Google Analytics in Wordpress, Check the video tutorial below.
Recommended Reading:
White Hat Seo
Asynchronous tracking is an improvement to Google’s previous tracking code. It takes advantage of browser support for asynchronous JavaScript to enhance the speed in which the tracking code is loaded.This post will explain How to Google Analytics in Wordpress blog correctly.
• Faster tracking code load times for your web pages due to improved browser execution
• Enhanced data collection and accuracy
• Elimination of tracking errors from dependencies when the JavaScript hasn’t fully loaded
It's better to put the asynchronous code just above</head>
since it doesn't slow down your site in any way and your tracking request time will be more accurate.
There are two ways to install Google Analytics tracking code in Wordpress theme.
1. Editing Theme in Word press
*Login in through wordpress admin panel
*Go to Appearance Editor (theme editor)
**Select header.php
</body>
(closing body tag) html tag**Find the
</head>
tag^ (closing head
tag) **Copy and paste it into your web page, just before the closing
</head>
tag^.*Click Update File to save changes.
* Now open your blog and view source to see Google Analytics code in wordpress
^One of the main advantages of the asynchronous snippet is that you can position it at the top of the HTML document. This increases the likelihood that the tracking beacon will be sent before the user leaves the page. It is customary to place JavaScript code in theRemember:</head>
section, and Google recommend placing the snippet at the bottom of the</head>
section for best performance.
Read detail HERE
*If you have changed your wordpress blog theme, you need to repeat above process.
*Make sure you select ga.js Google Analytics Code
2. Using a Plugin in Wordpress Blog to Add Google Analytics Tracking Code
Use this plugin WP Google Analytics
There are many plugins that can help you do this.
Search for More Google Analytics Wordpress Plugin here (external Link to wordpress)- simply type Google analytics and click seach plugin
Important Note:
*Don’t accidentally have Google Analytics code in more than one section on your side, always view Source and make sure you don’t see two GA code snippets on same html page, if you do, this will definitely break reporting to Google AnalyticsManual Installing of Google Analytics vs Using Plugin
The only problem with the manual installation is that if you change wordpress themes you will loose your Google Analytics tracking. That is why it is better to handle the Google Analytics tracking code within a plugin. The selected plugin is a simple plugin which remain same even when you change the theme
However if you are not much aware of wordpress Plugin then use manual installing of Google Analytice code. When you change the wordpress theme you can again follow manual procedure for adding Google Analytics Code in your wordpress blog
My advice is to add Google Analytics Code wordpress blog manually. One important reason to do this is, when you update your wordpress version, it may not support that plugin immediately.
Still having confusion with How to install Google Analytics in Wordpress, Check the video tutorial below.
Recommended Reading:
White Hat Seo
This post was very helpful in understanding about procedure to add Google Analytics in Wordpress blog.
ReplyDeleteThanks
Good information. It is very important to add Google Analytics in Wordpress very carefully and correctly. Hope this guide on how to install Google Analytics in wordpress will be helpful to others.
ReplyDeleteThank you for sharing.
This post have made easy understanding on process to Add Google Analytics in Wordpress.
ReplyDeleteThank you :)
Helpful:)
ReplyDeleteI too successfully added Google Analytics code in my wordpress and its working fine.
Thanks for posting the correct process of adding analytics code in wordpress blog.
The tutorial is quite simple and perfectly explained :) . Google analytics is one such thing that we all check hundreds of time .And having it installed in Wordpress is very helpful and essential too :) . Even I have to install it it now . Hope your guide will a help a lot of people.
ReplyDelete