How to add Google Analytics tracking code to your Wordpress blog.
By Long on Dec 1, 2007 in Wordpress
When Google Analytics (GA) first came out, I found it to be a bit disorienting so I never really gave it a shot.
This evening I thought it was about time I learned more about my blogs (all of which are wordpress).
Google says your supposed to put the tracking code before the </body> tag. But I couldn’t the darn tag in the wordpress templates!
So thanks to Make Money Fast, a blog that came up in my search for the answer, it turns out that you put the code in the footer template of your wordpress blog, again, just before the </body> tag. (This can be found in Presentation > Theme Editor)
To be fair, since it takes a day or two for GA to collect enough data, I’m not 100% sure it took yet. I’ll comment on this blog if it works!


Long H. Duong, Esq. | Dec 7, 2007 | Reply
Just an update to this post. GA finally collected enough data and it’s working like a charm!
Benton | Dec 19, 2007 | Reply
I originally had a friend put GA tracking code on my blog. I recently upgraded to the latest version of wordpress and changed themes at the same time. I wasn’t sure which caused it, but GA quit working. Your post was very helpful in figuring out that the tracking code was part of my old theme and getting it placed in my current theme. Thanks.
Anita | Jan 2, 2008 | Reply
Thanks! Not knowing how to install the code was a nagging problem and I’m glad to finally find a solution.
David | Jan 18, 2008 | Reply
Thanks for the tip. I was having the same issue while setting up my new blog and with your information, it was fixed immediately.
Bryan | Mar 2, 2008 | Reply
Thanks for the info on where to stick this code in Wordpress.
Jim | Mar 24, 2008 | Reply
Thanks,
For the tip, it didn’t work yet but I’ll give it some more time
and check later.
Jim
Jim’s last blog post..Golf Shoes - Size and Style Guide
Jim | Apr 12, 2008 | Reply
Hey,
Update to post 6 yes, it works like a charm, google Analytics is up and running
for my word press site. The marketing gurus tell you, never build a site with lots of competion, golf has plenty. But if you dig deep there are plenty of products to sell. PPC is working for this site.
Thanks for the Info
Jim Novak
Jim’s last blog post..Golf Shoes - Size and Style Guide
Layne | Jun 4, 2008 | Reply
Thanks so much! I was frustrated…this solved my problem!
Layne
Stephanie | Jun 23, 2008 | Reply
Thank you for this information! I recently switched to a WP blog and spent more time clicking through all the settings than I wish to admit!