Frequently Asked Questions:
Where do I insert my Google Analytics code?
Because a WordPress blog is a dynamic, database-driven site, there’s not a simple place to insert the Google Analytics tracking code. Fortunately, however, some clever people have created free plugins that will insert your Google Analytics code everywhere it needs to be without you ever touching the template files. The plugin I use can be found here, but you can also google “wordpress plugin google analytics.”
If you use the one I linked to above, just extract the folder and upload into your “plugins” folder, inside your “wp-content” folder. NOTE: with that particular plugin, you need to use the “legacy” urchin.js tracking code, not the newer fancier one. In your google analytics control panel there will be an option to copy the urchin.js version or the newer one. Make sure you use the urchin.js one for this plugin.
Once you’ve uploaded the plugin, activate it from within your WP Admin area under the “Plugins” tab. Then, under “Settings” (”Options” if you’re on an older version of WordPress) and you should see a “Google Analytics” link in the submenu. Click on it, and past your code into the box and then click save.
Related Posts: Uploading and Installing a Plugin, Adding Statcounter tracking code to your blog
Questions? Instead of emailing for support, leave a comment below so everyone can benefit from any clarification.
Once I paste the code into the box, I get a message saying it’d deactivating due to fatal error. What am I doing wrong?
Thank you
Shirley » huh… never heard of that before. can you paste the error message in a comment so I can see it?
I just noticed this message along the bottom of :Google Analytics” :
“Warning: Making changes to active plugins is not recommended. If your changes cause a fatal error, the plugin will be automatically deactivated.”
I did something wrong.
Shirley » odd. why don’t you try deactivating, then deleting the plugin off your server and reuploading it. i’m assuming you didn’t edit the code at all, right?
Will do. No editing was done. I copied and pasted as is……..would WP version interfere? I’ll let you know what happens.
do we have to put the google code on every page or just that box you pointed out? im not seeing it coming up in my google analytics page.
thanks.
nevermind. i think i got it.
thanks.
when I paste the code - do I delete the code that there? Becasue there Is a code already adn it seems identical to the one genreated apart form a 1d noumber.
Anyway if I paste under the code that there and hit update its just defalts back to the other code that already there……………. If delete the orignal cade it will update but google checks my status and says its not verified??
Sorry didn’t give you my web addy to check
@Kym: delete the code that is there and paste in yours. then give google 24 hours to find the code, it should be there.
Okay - great thats what I’ve done …I’ll checc back in 24 hrs and let you know
Thanks
Kym