Google Analytics is used to track the traffic data received on a website or a blog. You as a webmaster can use that data to analyze your visitors or audience. And implement the perfect or more accurate marketing strategies.
Google Analytics recommends to add the code just after the opening body tags <body>. So, we will take that into consideration. You can also add the codes just before ending body tags </body>. The advantage in using the code just before </body> tag is that, it will not hinder the rendering of the page on slow internet connection.
In case you have a custom made template, you may rely on this method. Because custom made template don't get regular updates.
So, try using the text widget to avoid the error. Paste the codes, in any text widget and place it anywhere.
How to add Google Analytics to WordPress?
Users rely on plugin to integrate Google Analytics, code into WordPress blog. But accomplishing this task is very simple. Without using any plug-in you can very easily put your Google Analytics code to your blog or website.Google Analytics recommends to add the code just after the opening body tags <body>. So, we will take that into consideration. You can also add the codes just before ending body tags </body>. The advantage in using the code just before </body> tag is that, it will not hinder the rendering of the page on slow internet connection.
- Login into Google Analytics.
- Navigate to Admin tab.
- Select to Account and Property values.
- From Property column click on Tracking Info and select Tracking Code. You will get your tracking code JavaScript here.
- Copy all the codes.
Google Analytics to WordPress
- Now, login into WordPress blog.
- Navigate to Appearance > Editor.
- Select header.php or footer.php.
- Now, in case you header.php paste the copied tracking code just below <body> tag. In case of footer.php, you will find </body> tag at the bottom. Paste the Google Analytics tracking code just above the ending body tag, </body>.
Problem with above method
There is one very big drawback. Every time, you will update your template your codes will be gone. So, you are required to do this again if you have applied any update.In case you have a custom made template, you may rely on this method. Because custom made template don't get regular updates.
Add Google Analytics to WordPress |
Author's Bio: Shubhashish Shukla (follow him) is the person behind Sector Techno (twitter, facebook), a technology blog. An always learning web developer.
wow very nice information ,it's more help to me. Please keep posting like this.
ReplyDeletethanks & regards
A-Care
Very nice information ,it's more help to me.
ReplyDeletethanks & regards
A-Care
Superb information ,it's more help to me.
ReplyDeletethanks & regards
A-Care