Adding google analytics code to WordPress

Posted on April 2, 2008
Filed Under Knowledge sharing |

When started my new blog with wordpress it was totally a new experience. Wordpress had lot of plugins to offer as compared to b2evolution which seems to be more towards work flow management.

I tried searching on google for any famous plugin that can allow me to add analytics code to this wordpress blog. I found semiologic-dot-com/software/google-analytics/ and when tried, could not find any analytics codes within my home page source.

I followed the instructions again to check whether I was wrong somewhere, in the last two lines of instructions it was written

  1. If it said Tracking Not Installed, click on Check Status. Google then checks your blog for the Analytics Code Block and reports back if it find it or not.
  2. If not, try re-adding the Google Analytics Code Block.

Well if it is not able to add in first instance, how would it be able to add it later on. It seems they are creating fake plug ins for just publicity or may be the .php script has lot of bugs.

The simpler way to add the code

Log in to your control panel, go to “Presentation” and select theme editor and open footer.php (make sure your footer.php has 777 rights enabled) and add the google analytics code just before </body> and check the status. If it doesn’t works try adding the “ga.js” code and retry again.

If your domain doesn’t have a 301 redirect, your url would be without “www”, make sure you have entered the correct url in google analytics.

Surely It will work.

Comments

Leave a Reply

You must be logged in to post a comment.