How to Add Google Analytics to a WordPress Blog - dummies

How to Add Google Analytics to a WordPress Blog

By Leslie Poston

The most basic thing you can do for your blog is make sure that you put Google Analytics, at a minimum, on your site. WordPress is currently one of the more popular and easy-to-set-up site blog tools. Chances are, you already have your blog set up in WordPress or know someone who does who can help you if you get stuck.

First, make sure that you’re hosting your blog yourself. You can go to a site like Bluehost and sign up for one of its monthly hosting plans (in general, under $10 per month for unlimited domain name hosting) and also purchase your domain name (the portion of things).

You can put Google Analytics on your WordPress blog in two ways. The first involves copying some code into your blog’s footer page.

  1. Head over to Google Analytics and enter your Google user name to sign in.

    Your username is always the Gmail account you use, just like the other Google toys.

  2. Add a new Analytics account.

    This account will be — the site you want to track. This step brings you to a page with a bit of JavaScript code.

  3. Copy the entire code showing inside the Tracking Code box into your clipboard.

  4. Open your WordPress dashboard in another browser tab.

  5. In the left column, click Appearance.

  6. Go to the Theme Editor.

  7. Open the Footer file.

  8. Carefully scroll down to view the Footer file code and insert the JavaScript you copied form Google Analytics before </body>.

  9. Save your changes.

As you can imagine, this method comes with a few risks for the beginning blogger — like accidentally deleting a snippet of code you need. Don’t panic — there is another, simpler way that uses plug-ins to do the same thing with less risk.

To use plug-ins to install Google Analytics on your WordPress blog, you need to go back to the tab where you have Google Analytics open.

  1. In your Google Analytics Dashboard, simply click the word Edit next to the URL of the domain name you want to get the code for.

  2. Copy the code beginning with UA into your clipboard or simply write it down (it’s short); then go back to your blog.

    The code that begins with UA in your Google Analytics ID.

  3. In your blog dashboard, click Plugins in the left column.

  4. Click Add New in the drop-down menu that appears.

  5. Use the plug-in search to find the Google Analytics plug-in.

  6. Click Install gin.

  7. In the Plugin settings, add your Google Analytics ID.

    This is the UA-#######-# that you copied or wrote down in Step 2.

  8. Save your changes.

About 24 hours after doing either of these methods, your analytics will begin tracking. For the first day or so, it will look like nothing is happening — you’re new! Give your analytics time (and feed it content), and you’ll start to see some action.