Adding Google Analytics to WordPress
Installing Google Analytics to WordPress is easy: add your tracking code to footer.php just above the ending </body> tag.
1. Login to WordPress
2. Go to Appearance, then select Editor – this will display the source code for your word press files, be careful here!
3. With your Editor open, on the right hand side of your screen just underneath Theme Files, find Templates.
4. Under Templates, select footer.php by clicking on it – this will load the source code for footer.php into the editor.
5. Insert your Analytics code just above the ending </body> tag then click Update File and you’re good to go.
If you’re asking “What is Google Analytics?” – it’s robust tracking software that allows you to monitor how users interact with your site. You get site stats plus the ability to set up goal conversions for product sales, lead generation and more. You can also wire up Analytics with your AdWords campaigns and eCommerce platform which gives you the ability to track dollar-for-dollar your advertising spend and monitor ROI%.
It’s free to sign up for Google Analytics: http://www.google.com/analytics/sign_up.html




Thanks!
Okay, so now I am confused. If it is this simple, why are there plugins for this? I was about to install a plugin but came across this post instead…this seems a lot easier. thanks!
@CraigB: Glad you found it useful. I guess the definition of “simple” is relative!
This is awesome, thank you! It only took 5 minutes and no plugin. I’m new to Wordpress and was nervous to try this, but it worked great!!!
Kinda funny. I just did this. I was looking around in the files and found the footer. Said Hmm wonder if I could put my analytics code there? Did it – and tonight I decided to research it. Guess I put it in the right place. Thanks for the affirmation.
Thank you so much for this! This is the clearest, easiest and most accessible (not to mention shortest) explanation on how to do this that I’ve found on the Web. Didn’t want to install a plug-in, and definitely didn’t want to sign up for some workshop just to do this! (And yeah, someone is actually hawking a workshop on this.) Awesome job!
Salut,
Marjorie