February 6, 2012

Adding Google Analytics to WordPress

Just as the title says: this post is about adding Google Analytics to your WordPress Site. With no further ado, here is how you do it.

1.) First, visit your Google Analytics account to give Google some information about your site. Once you login, click the add a new profile link like the one below:

google analytics new profile link Adding Google Analytics to Wordpress

2.) Fill in the required information as seen in the image below.

Add site to google analytics Adding Google Analytics to Wordpress

3.) When you click continue, Google will give you a snippet of code to add to your WordPress template. Copy that code and login to your WordPress admin.

4.) Once logged in, click on Editor listed under the Appearance tab:

Analytics to wordpress Adding Google Analytics to Wordpress

5.) In your theme editor, select the Footer (footer.php) file or possibly the end.php file (depending on your template), from the right hand column:

Themes editor wordpress Adding Google Analytics to Wordpress

6.) From here, take the code you got from Google and add it just above the </body> tag as shown below:

wordpress footer editor1 Adding Google Analytics to Wordpress

7.) click Update File and you’re done.

You can now track your site traffic with Google.