Web Page Analytics Explained

Now that we have a healthy appreciation for the difference between what happened on our digital property and the ongoing challenge of understanding why it happened, we can start to dig into the basics of analytics.

Remember, the data will tell you what the user did but it’s up to you to take that information and figure out what to do.

To track a clickstream or any user behavior on a website, every web page needs to have a small snippet of tracking code attached. This is usually a JavaScript tag that is embedded into the HTML code. Think of it as installing a pay phone on a corner in a city (admittedly, this is a dated technology but bear with me as we explore this analogy).

Analytics: The Pay Phone on Every Corner

Every web page across your site is like a street corner and you can think of analytics as a pay phone.

When a page is loaded, the tracking code tag then basically “phones home” to the analytics software on a 3rd party site and says, for example, “Hey, the About page was requested so start the timer for how long the user is on that page”. When the user then clicks over to the Contact page, the phone on that corner gets hung up and a new phone call on a different corner is placed for that fresh page. The analytics platform (eg. Google Analytics) remembers the previous phone call and files it away all the while measuring the location on the site and the time spent, in addition to many other metrics.

On a Content Management System (CMS) like WordPress, inserting this tracking tag is very easily done with a plugin. This handy feature simply spits out the tracking tag out on every single street corner across your site – i.e. page or blog post.

Don’t worry too much about the mechanics of how this happens but understand that for a web page or app to be tracked, there has to be a little marker in the code on every unique page that “phones home” and let’s a 3rd party vendor like Google Analytics or Webtrends know what’s happening.

In short, every street corner needs a pay phone to let us know where and for how long a phone call was placed on the site. Web page analytics explained this way doesn’t seem too scary, right?

If you log in to your analytics program and see zero visitors despite knowing there is traffic flowing in, you might be missing the tracking code on that page.  If this is the case, we highly recommend you get in touch with a developer (someone with a working knowledge of HTML, CSS, and JavaScript) to help you insert the tracking code on each page.

Tip: There is a quick way to verify if the tracking code is indeed installed correctly on an individual web page. Almost every browser has a feature where you can view the source code (In Chrome: View -> Developer -> View Source). This will show you the HTML for that page and you can simply and do a “Find” for the tracking code (In Chrome: Edit -> Find). See below for what to look for within universal analytics – UA. Chrome (Edit the following page). Hannah

What to Look For

For Google Analytics this tracking identifier usually starts with “UA-“ and can be a quick check to make sure everything is installed correctly.

It should look something like this:

<script type=”text/javascript”>

var _gaq = _gaq || [];
_gaq.push([‘_setAccount’, ‘UA-XXXXX-X’]);
_gaq.push([‘_trackPageview’]);

(function() {
var ga = document.createElement(‘script’); ga.type = ‘text/javascript’; ga.async = true;
ga.src = (‘https:’ == document.location.protocol ? ‘https://ssl’ : ‘http://www’) + ‘.google-analytics.com/ga.js’;
var s = document.getElementsByTagName(‘script’)[0]; s.parentNode.insertBefore(ga, s);
})();

</script>

Where the UA – XXXXX-X will be a unique set of characters for your particular web property. Think of it like a phone number for your website that only Google Analytics can see. Every time a call is registered from your site (remember, this means a user is there) to Google Analytics, the software is able to track data about what that user is doing on that particular page.