I keep hearing from you and others that I really need to be tracking how people use my Web site and that I should be collecting “aggregate traffic statistics” and such. I’ve heard that Google Analytics is good – and the price, free, is great – but I’m not really clear how to use it and add it to my site. Can you please step me through the process, Dave? Thanks!
You have received good advice! Regardless of the level of complexity of your Web site, whether it’s a huge blog with thousands of articles – as mine is – or a five page brochureware billboard for your service business, it’s critically important and darn useful to be able to know how many people are visiting your site, from where, how, and what they do once they’re on the site.
As a simple example, let’s say that you offer three different services through your company and you have three pages on your little Web site that highlights those, one per page. Which gets more traffic? What can you conclude about the appeal of your business based on that? Which of those converts into the potential customer picking up the phone and calling you or clicking on “contact us” and emailing in a query? Without feedback you’re in the dark. With feedback you can continually refine your pages and your business both, growing smart and effective.
Start by going to Google Analytics and either signing up for a new account or signing in to your Google account. The button you seek is this:
Once you’ve signed up you’ll see an overview page which won’t be very exciting since you don’t have any collected data as of yet. On the right you’ll see this, however:
Click on the “+ Add new profile” link and you’ll be able to specify the URL of your site:
Here you can see that I’m actually stepping through the process of adding the analytics code to my film blog, Dave On Film.
Confusingly, the system then gives you an error message that there’s no data to show:
Well, duh, there’s no data because we just set up this account. You’d think Google would be a bit smarter about this step of the process!
Scroll down a bit on this page and you’ll see the following:
All you need to do now is basically copy and paste the complicated-looking HTML code that’s in the box. Click anywhere in the box, which should select all of the content. Now type Ctrl-C, or Cmd-C or choose File –> Copy (depending on PC or Mac).
Open up another browser window or a new tab and get to the source code for your own Web pages. If you have a blog, you’re in luck: just open up the appropriate template or templates so you can access the skeletal contents of the site.
Move to the bottom of the source page and before any sort of </body> or </html> simply paste the block of code from Google Analytics.
Save the new pages, rebuild your blog if appropriate. If you have a site where you’re managing the pages manually, then you want to paste the analytics code onto every single page you’d like it to track and analyze for you. If you skip some, it won’t know about them and your reporting data could be skewed.
Now that you’re done adding the code, refresh the page on Google Analytics and instead of getting the earlier error, you should see this:
Great. Now it’s just a matter of sitting back and relaxing, waiting for some traffic to show up so you’ll have analytic data. In the meantime, this is what it’ll look like:
Remember that unlike many other services, Google Analytics is not real time, so if you reload a page, don’t expect to instantly see that traffic reflected in your reports. Generally I find that analytics is about 12 hours behind.
Now your challenge is to drive traffic to your site and to remember to at least occasionally go and look at the Google Analytics data!