How to Add Google Analytics Code to WordPress

Don’t download any software. That is unnecessary- but is just a way for a guy to get extra links to his site.

Simply go to your WordPress folder (the root of where all your files are installed), then open up ‘wp-content’ then open your theme folder. If you’re not using a custom theme, then just enter the ‘default’ folder, then open footer.php.

In your HTML editor, copy and paste your Google tracking code immediately before the tag. You get your code from within your Google Analytics account.

So, your footer code will then look something like this:

<script src="http://www.google-analytics.com/urchin.js" type="text/ javascript">
</script>
<script type="text/javascript">
_uacct="UA-000000-0";
urchinTracker();
</script>

</body>
</html>

Wait a few days, and your visitor statistics should then be included in your Google Analytics report. Nifty.

This entry was posted in WordPress. Bookmark the permalink.

2 Responses to How to Add Google Analytics Code to WordPress

  1. Sheryljcgn says:

    If this works you’re an Internet Saint… I figured there must be a way without downloading someone’s plugin.

    Thanks!

  2. Linda Lopez says:

    Simple instructions and easy to follow. Thank you!

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>