Web Analytics 101: What It Is & Why You Should Care

Web analytics used to be a “corner of the desk” job in government departments, but with many governments (at all levels, around the world) taking a digital-first approach to communications and service delivery, the role of web analytics has taken a huge jump in importance.

Just like the internet is playing an increasingly large role in our personal lives (stop checking Insta while you’re reading this!), governments are increasingly using the web for communications, collaboration, and service delivery.

The point being, of course, that the web can be faster and more convenient (for citizens) and more efficient and economical (for governments) than other communication/collaboration/service channels.

But how do we know that the web is actually more efficient and effective for citizens and government? That’s where web analytics comes in.

Why You Should Care About Web Analytics

As uber management consultant Peter Drucker famously said:

And what gets managed (sometimes) gets improved

There are many examples of government organizations making tangible client service improvements through web analytics. Here’s a quick case study of one:

How USA.gov Used Web Analytics to Improve User Experience

In a case study written up on the Digital.gov blog, former employee David Kaufmann highlights the insights they obtained web analytics that were used to improve USA.gov:

  • Realizing the importance of landing pages vs. the homepage

“Most users came from search engines, and they primarily did not land on our home page. Rather, they started their experience with us on a content page somewhere within our site, and for them, that was in effect our home page.

This influenced our design by telling us that users would be orienting themselves on pages that we normally wouldn’t consider as a place to come to understand what our website is about. 

This was one of our data sources that convinced us to really pare down the design to just the essentials: one primary place for content, navigation, and search.”

  • Improving service efficiency by looking at time-on-site

“The data told us that our visitors did not hang out with us for very long. After jumping into the middle of our site from a search engine, they most often read the content on that one page and then used one of our links to pursue what they were trying to do. This was despite having a design that had columns of little boxes about other things that people might be interested in; so GA was one of the data sources that convinced us to strip that out.”

  • Realizing the importance of mobile

“Web analytics data also helped us understand that mobile users were becoming an increasing percentage of our customers. This contributed to our desire to make sure that our design was equally direct for users on mobile and desktop, and therefore to allow our writers not to think about different platforms when writing.”

  • Understanding the behaviour of the site’s primary users

“Overall, the Digital Analytics Program/Google Analytics usage data helped us pare down a sprawling site with busy content pages in a more efficient site that catered to its true primary users: people jumping in from Google to get an overview of a topic and know where to go next, and perhaps check out very closely related information as well.”

The bottom line is this: web analytics can often give us the insights we need to improve our target audience’s online experience.

In his video "Why Use Web Analytics?" Google’s Analytics Evangelist Avinash Kaushik lays out some of the fundamental questions that web analytics can help answer:

  • Why are people coming to your site?
  • What do people do on your site?
  • Were visitors satisfied with the time they spent?

Once you understand what web analytics is good for, you’ll realize that 2 out of the 3 questions above can’t be answered definitively through web analysis alone. To get definitive answers to those questions, you need to complement your web analysis findings with qualitative research.

Now let’s take a moment to define web analytics…

What Exactly is Web Analytics?

Here’s a definition of web analytics from the Digital Analytics Association:

Web Analytics is the measurement, collection, analysis and reporting of Internet data for the purposes of understanding and optimizing Web usage.


And incomplete, in my opinion.

The end goal of web analytics is FAR more than “understanding and optimizing web usage”.

Web analytics is better explained by the image below:

Adapted from Jeffalytics

Adapted from Jeffalytics

This is what web analytics can ultimately give us: insight!

Most importantly, web analysis is one important method that can give us insight into:

  • The needs of our target audience; and
  • How our web presence is contributing to the achievement of our organization’s goals

Avinash has a much better (and broader) definition of web analytics, which captures its power:

Avinash Kaushik - Google’s Analytics - Mauricemuise

Avinash Kaushik

Google's Analytics Evangelist 

Web analytics is the analysis of qualitative and quantitative data about your website and your competition to drive continuous improvement in your digital presence and your customer needs, which translates into great and fabulous desired outcomes, both online and offline.

I love the “great and fabulous desired outcomes” part!

Avinash makes two important distinctions in his definition:

  • Web analytics is NOT just about the quantitative data that you get from analytics software like Google Analytics or Adobe Analytics – it also includes qualitative data that you get from research methods like surveys and usability testing.

(I personally see web analytics as separate from qualitative methods, because the web analytics data you get from providers like Google Analytics and Adobe Analytics is quantitative. But maybe that’s just semantics…)

  • Web analytics should incorporate offline as well as online behaviour, including analysis of what happens at an organization’s offline locations, such as call centres.

Here are two more excellent video tutorials covering the fundamentals of web analytics:

The first video video is a great overview of what web analytics is good for, with an emphasis on tracking “campaigns” (e.g. paid advertising campaigns, placement of banner ads on partner sites, social media campaigns, email campaigns, etc.).

The video specifically references Google Analytics, but is a good overview regardless of which web analytics software you’re using.

The second video is by Jeff Sauer (aka Jeffalytics), one of the top Google Analytics consultants in the world, and in this video he provides a plain-English explanation of some common web analytics terms.

The video is also specific to Google Analytics, but he also provides simple definitions of terms that apply to all software, like Javascript, cookies, sessions (aka visits), and more (and if you’re using Google Analytics, this is a really good breakdown of a GA account). 

So now that you know what web analytics is and what it’s good for, let’s take a closer look at how it works…

How Web Analytics Software Gets the Data: A Plain English Guide

If you like to understand things at a foundational/technical level, this brief section is for you. If not, feel free to skip to the next module on how to build a performance framework for your website. 

Before you start working with web analytics software, it’s important to understand how that software gets the data in the first place.

(At this point you might be tempted to roll your eyes and think "That's for nerds!" Humour me for a moment...)

Here’s a solid argument for understanding the “mechanics” of web analytics software by Tim Wilson:

"If you’re a web analyst, understanding this is like understanding gravity if you’re a human being — there are some immutable laws of the internet, and knowing how those laws drive the data you are seeing will open up new possibilities for capturing activity on your site."

Tim Wilson

Veteran Web Analytics Consultant

So let’s start with a great graphic made by Tim that shows how data is transferred from a web browser to the web analytics server, whether you’re using Google Analytics, Adobe Analytics, or any other software:

Here’s a quick layman’s explanation of that graphic (with some steps added by me, to explain the full process):


Javascript is placed on your web pages.

“Javascript” is a programming language that allows web developers to add “dynamic” things to a web page (i.e. things that move, change, and/or are interactive, like moving graphics, maps, dropdown menus, etc.)

Since the HTML that’s used to build web pages only displays static information and images, Javascript code is used within HTML to display dynamic elements on web pages.

In terms of web analytics software, Javascript is used to dynamically retrieve information about a site visitor. It does this from your site’s web pages, where a small bit of your web analytics software’s Javascript code – called a “snippet” of code - is placed (the Javascript code is placed on every web page).

Here’s an example of what that Javascript code looks like for Google Analytics:

<!-- Google Analytics -->
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),

ga('create', 'UA-XXXXX-Y', 'auto');
ga('send', 'pageview');
<!-- End Google Analytics -->

Looks scary, I know!

But all you need to understand is when that code is placed on every page of your website, information from each of your visitors is going to be collected.

The information that’s collected by the Javascript code depends on the code itself – so basically the code needs to be written to “request” specific information from a visitor’s web browser. 

Which brings us to the second step…


Javascript figures out stuff about the visitor.

Once the Javascript code is placed on all of your web pages, it collects LOTS of information about your visitors. It does this by requesting information every time a visitor views one of your web pages.

The information the Javascript collects includes:

  • Information obtained from the visitor’s browser, e.g. type of browser, language setting, cookies that have been set); and
  • Information about the visitor’s behaviour, e.g. what pages on your site they’ve viewed, which “elements” (such as links) they’ve clicked, etc.

The Javascript code also pulls information from “cookies” that are in a visitor’s browser.

A “cookie” is a text file that stores information that is used to identify a particular visitor to a website, such as language preference, login ID, password, etc.

(Note that Javascript only reads what are called “first-party” cookies, i.e. cookies that have been set by your website only.)

For example, if you’ve signed up for a Government of Canada service like My Service Canada Account (MCSA), then you’ve had to register for an online account. Once you register, to log into that account every time you visit the site, you need to enter your user ID and password.

“User ID” and “password” are two pieces of information that could be stored in your web browser using a first-party cookie. Once that cookie is set in your web browser, the next time you go to log into MSCA, you’ll see your user ID and password automatically populated in the login page.

Along with the other types of data mentioned above, Javascript will pull user ID and password from the MSCA cookie.


Javascript packages that information into a single “string” of information

Once the Javascript code has collected all the bits of information about a visitor, it converts the information into a “string” – basically, a long line of text, numbers, and characters.

Here’s the example that Tim Wilson gives to illustrate this:

Let’s say the Javascript had figured out the following information about a visitor to a page:

Site = www.gilliganondata.com

Page title = The Fun of Facebook Measurement

Page URL = /index.php/2010/01/11/the-fun-of-facebook-measurement/

Browser language = en-us

Converting that info into a single string is pretty straightforward. Let’s start by pretending we’re going to put it into a single row in a pipe-delimited file. It would look like this:

Site (hostname) = www.gilliganondata.com | Page name = The Fun of Facebook Measurement | Page URL = /index.php/2010/01/11/the-fun-of-facebook-measurement/ | Browser language = en-us

So, to recap, once the Javascript collects information about a site visitor, it combines all of that information into a “string”, or a single line of text, numbers, and characters.


Javascript makes an “image request” with that string tacked on the end

The “string” that was assembled by the Javascript code in step #3 needs to somehow be sent back to the web analytics software server, so the server can store the data and the software can display it in reports.

Javascript does this by making an “image request” (also called a “beacon request” in Adobe Analytics) – which means the Javascript asks the web analytics server to send a 1X1 pixel image that it can then attach the information to and send it back to the server.

Attaching information to an image in order to transfer the information from one computer to another might sound a little strange, but think of it this way: in order to transport garden soil from your house to your backyard, you need to put it in something - a bag, a wheelbarrow, or something else.

Same thing with information transported from a visitor’s browser to the web analytics server. That information needs to be put in something or, in this case, attached to something – a very small image.

So to sum up, in order for a visitor’s web browser to transmit the information that Javascript has collected, the browser has to attach the information to something – and a GIF image is the smallest, most-compatible thing that can drag information along with it.

Continuing Tim’s example above, the Javascript in the web browser would send an image request to the web analytics server using this URL (if the web analytics software is Google Analytics):


(The “.gif” in that URL is the image.)

Then the Javascript attaches the visitor’s information to the image URL, and sends it back to the web analytics server. Again, using Tim’s example, here is the information from the visitor’s browser that we would want attached to the image URL:

Site = www.gilliganondata.com

Page title = The Fun of Facebook Measurement

Page URL = /index.php/2010/01/11/the-fun-of-facebook-measurement/

Browser language = en-us

And the image URL would look like this when that information is attached to it:





If you look right after the “.gif” in that URL, you’ll see an important symbol - a question mark (“?”).

A question mark in a URL is a “separator”, meaning it separates the URL (which is the address of something on the web, like a page or a document) from the “query string”, which is a string of information that’s being passed to a program (in this case, the web analytics server).

So the image URL above includes (1) a URL, and (2) a query string with a bunch of information about our visitor


Web analytics tool reads the string and puts the info into a database

At this point the web analytics software (e.g. Google Analytics or Adobe Analytics) has received the image URL from the visitor’s browser that contains all of the information about the visitor.

The software then separates the various bits of data from the image URL and stores all of that data in the software’s database (in the example above, the data that would be pulled out and stored would be site URL, page title, page URL, and browser language).


Web analyst queries the database for insights

Now the data is ready to be accessed as “reports” from the web analytics software. The software organizes the data into reports automagically behind the scenes.

(But we all know that good web analysts don’t just run out-of-the-box reports – at a minimum, they create custom reports based on the ​segment their data of their organization, and they segment their data for deeper insight.

If you’d like to watch a video primer on how Google Analytics collects data (which is essentially the same way Adobe Analytics collects data), there’s a great video on Lynda.com (clicking the video image will take you to the video on Lynda.com. Apparently they don’t allow embedding 🙁

Wrapping Up

In this module I covered the basics of web analytics:

  • What it is
  • Why we use it
  • How it works

In the next module I show you how to connect web analytics to performance measurement, and show you how to build a performance framework to measure the success of your digital presence.

Click here to go to the next module now.

About the Author Maurice

I've been working in digital marketing for 15 years, with a specialty in web analytics and everything performance measurement. I'm a researcher by avocation and love building frameworks (how nerdy is that!)