Use Google Analytics on Wordpress site

Soldato
Joined
6 Jan 2006
Posts
3,422
Location
Newcastle upon Tyne
What is the best way to add Google Analytics to my WP site? Manually add it to the header or use a plugin? Or is there another method perhaps?

Thanks
 
I did search thanks and there are many but was hoping someone with more experience than me (or my google skills) could help me out :)
 
My intial question still stands though, is a plugin the "best" way to add analytics to a WP site? Ive seen posts on here recommend having as few plugins as possible for security.
 
If it's my own website I hard code it in. because it seems to me that the more plugins you put in wordpress the longer it takes to load.

If it's a client site I will put it in a plugin so that client knows where it is.
 
I normally advocate the fewer db queries the better but if you change your theme/code often then Analytics is better in a plugin as you will likely forget to re-add it.

It's also bundled with the most popular SEO plugin. WordPress SEO by Yoast:
http://yoast.com/wordpress/seo/
 
That's true, if you use yoast anyway, and you probably should. It's awesome. Then you may as well include it there.
 
Back
Top Bottom