Friday 14 March 2014

How to add Google Analytics to WordPress?

| Friday, March 14, 2014 | | | |

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.

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.
  1. Login into Google Analytics.
  2. Navigate to Admin tab.
  3. Select to Account and Property values.
  4. From Property column click on Tracking Info and select Tracking Code. You will get your tracking code JavaScript here.
  5. Copy all the codes.

Google Analytics to WordPress

  1. Now, login into WordPress blog.
  2. Navigate to Appearance > Editor
  3. Select header.php or footer.php.
  4. 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.

how to add google analytics to wordpress
Add Google Analytics to WordPress
So, try using the text widget to avoid the error. Paste the codes, in any text widget and place it anywhere.

Author's Bio: Shubhashish Shukla (follow him) is the person behind Sector Techno (twitter, facebook), a technology blog. An always learning web developer.
Related Posts with Thumbnails

3 comments:

  1. security service in chennai19 March 2014 at 13:04

    wow very nice information ,it's more help to me. Please keep posting like this.

    thanks & regards

    A-Care

    ReplyDelete
  2. security service in chennai19 March 2014 at 13:05

    Very nice information ,it's more help to me.

    thanks & regards

    A-Care

    ReplyDelete
  3. security service in chennai19 March 2014 at 13:06

    Superb information ,it's more help to me.

    thanks & regards

    A-Care

    ReplyDelete