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.