Monday, November 12, 2012

How to install Google Analytics in Wordpress


How to Install Google Analytics in WordPress ?

This was my question a few minutes ago, and here is the most simple answer :)
Assuming you have Google Analytics set up. If you haven't then start by signing up for Google Analytics account http://www.google.com/analytics/ , its free and simple.

1 - Copy the code that you received in from Google Analytics, and paste it in your theme’s header.php right above the < / head > tag . [Preferred way] 
OR
2 - Copy the code that you received in from Google Analytics, and paste it in your theme’s footer.php right above the < / body > tag 
Theme's header.php and footer.php can be found by going into your Wordpress dashboard > Appearance > Editor
Now on your right you will see a sidebar listing all your pages. Locate the header.php or footer.php whichever you want.


If its still not working, leave your questions in the comments :)

2 comments:

  1. this is really helpful for me i want to install Analytics in my wordpress site

    ReplyDelete
  2. Great article Muhammad Ali many people doesn't know that how to embed analytics you done a great job

    ReplyDelete