How to Add Google Analytics Tracking Code in WordPress

If you’ve got a website running these days then chances are you want to track what people are visiting on your website.  Google Analytics is not a new technology by any means but it’s an important technology never the less helping you understand how people are using your website.

Depending on what theme you are running on your WordPress website you may find an option to add Google Analytics Tracking Code to your theme however if this is not the case then here is a quick and easy way to do this…

Step 1: Log into your Google Analytics account (You’ll need to create a Google Analytics account in order to complete this step) and grab the Google Analytics Tracking Code.  You can get this tracking code by clicking on “Edit” if your website has an existing website profile in Google Analytics (from clicking edit you’ll need to click “Check Status” >> Copy your Google Analytics Tracking Code >> install the tracking code in WordPress (See next step for details) and click “Finish”. If it’s a new website you’ll need to create a new website profile (scroll to the bottom of the “Website Profiles” page and click “Add Website Profile”)

Step 2: Paste the Google Analytics Tracking Code into the footer.php file in WordPress and click “Update”.  Log into your WordPress website and navigate to Appearance >> Editor >> Footer (footer.php). Once you are in the WordPress file called Footer.phpyou’ll add the Google Analytics Tracking Code just before the </body> tag and click “Update”. Lastly go into Google Analytics and click “Finish” on the Tracking Code screen so that Google Analytics can go and verify that the tracking is installed correctly.

Note: If you are using a premium WordPress theme from WooThemes, StudioPress and others there is usually a much easier way to add the Google Analytics Tracking Code.

Step 3: Being tracking your website’s analytics in Google Analytics!

What you’ll find is that you can start tracking your WordPress website quickly and start to understand how people are using and viewing your web pages, make improvements to your website and use Google Analytics to drive change on your WordPress website.

Luc Arnold
Drive Change through Analytics!

Leave a Reply

Your email address will not be published. Required fields are marked *

This blog is kept spam free by WP-SpamFree.