How to Add Google Analytics to Wordpress

These directions assume you have a Google Analytics account set up and have access to the tracking script code provided by Google. An alternative solution is to use a Wordpress Plugin to install Google Analytics for you. Google Analytics for Wordpress stands out to me based on its ratings, over 700,000 downloads, version status (3.25) and recent update (December 6, 2009). I can't say I have used this plugin. But Ive had good experiences with the authors of this plugin, yoast.com.

1. Get your Google Analytics tracking script code If you already have an account finding code again can a bit tricky. Go to the account you wish to set up. Then click the edit link. Click the 'Check Status' link. The resulting page will contain the tracking code.

google-analytics-wordpress-2

2. Access your theme editor Access your Wordpress admin area. Expand the 'Appearance' options in the left sidebar. Select 'Editor.

google-analytics-wordpress-3

3. Insert the code into footer.php Access the footer.php template under the list of Theme Files on the right. Paste the Google Analytics tracking script code just before the </body> tag.

google-analytics-wordpress-44. Confirm the installation View the which contains your tracking code. If your tracking code is installed correctly it will report "Waiting for Data" or "Receiving Data". If you see "Tracking Unknown" or "Not Verified" something went wrong.

5. Get yourself a tall drink That's it. Congratulate yourself. Bask in the glow of Google Analytics. The fun is just beginning now.

I hope that helps you. Let us know if you have any questions or can use more explanation.

Author

Loyan Roylance

comments powered by Disqus
back to top