fbpx

How Does Google Analytics Actually Work?

Curtis Weigel

By Curtis Weigel

Google Analytics is a great service for many reasons, most notably, its price tag: $0. Another great advantage for site owners is its ease to set up. In just a few simple steps, site owners can track most (but not all) visitors to their site.

After signing up for an account and adding a small snippet of tracking code to every page, site owners are ready to track a wealth of information about site visits.

But not every visitor can be tracked, and not all types of interaction can be recorded with the basic installation of Google Analytics (GA). The reasons for both of these limitations are caused by the internal workings of GA itself.

With that in mind, I’m hoping that this post will help demystify what’s actually going on in Google Analytics. Specifically, I’m going to focus on how GA collects information from a site’s visitors. With a better understanding of this process, you should be able to recognize situations wherein Google Analytics might not be providing your site with very accurate information.

How Does Google Analytics Collect Information About Visitors?

How Google Analytics works is by collecting information about site visitors. 

From a website’s traffic sources, to the number of hits per month, Google Analytics offers excellent insight into users behavior, and collects valuable user data in real time.

GA uses a programming language called JavaScript to transmit information to Google’s servers about site visitors. Now 25 years old, JavaScript is an (almost) universal language that allows coders and developers to make sites interactive.

You may know that when you see a website, the text, images, and other information contained in a page are saved in HTML format, which your browser decodes and displays. 

An easy way to think about this is that HTML is like the .doc file format used for Microsoft Word Documents. Like a Word Document, an HTML file can tell the computer what text to display, where to include images and tables, and what formatting to use.

html page code

But unlike a Word document, HTML pages are read-only. Meaning that without the help of a language like JavaScript, an HTML page won’t let you interact with a site. For example, you couldn’t change text and your computer or communicate with a server.

JavaScript gets around that additional limitation because it is a standardized language, meaning, a strong majority of browsers can take instructions written in JavaScript and provide additional interactivity. Everything from flyout menus to popup windows are possible thanks to JavaScript.

But importantly for Google Analytics, JavaScript allows your computer to send and receive messages to other computers connected to the internet. When you visit a site that has implemented Google Analytics, the site will ask your computer to temporarily download some JavaScript instructions from Google Analytics.

That code, in turn, will ask your browser to send some important pieces of data to Google’s servers. Data collection could include the specific web page that you are viewing, technical information about your computer, how you arrived at the site, or the way that you navigate the site.

Studies have shown that around 50% of the top million websites on the internet utilize GA. This means that most of the time you are online, your information is being sent to Google’s servers. This may seem a little alarming to you as there are obvious privacy concerns when that much information is collected when you are browsing the net.

Fortunately, Google has taken this concern so seriously that it is built into the very design of GA. Rather than collecting information about a specific user and tying that to their name, GA instructs its information to be sent anonymously.

If I visit a site and check three pages, Google Analytics won’t collect information in the form of ‘Tim Marco visited your site three times’. Instead, it will simply tell the site that a user, using a specific keyword, browser, and from a certain region, visited their site three times.

Why does any of this matter?

There are two important takeaways from how GA collects information that should matter to any site owner.

  1. Users without JavaScript capabilities, or who turn it off, are invisible to Google Analytics.
  2. Google Analytics does not allow websites to deeply track user-level interactions.

Why are some users invisible to Google Analytics?

Because Google Analytics is written in JavaScript, some users will always be invisible to it. I mentioned earlier that JavaScript is an almost-universal language, but the fact remains that some users either don’t have JavaScript capability or actively turn off JavaScript on their browsers.

Modern computers, tablets, and smartphones pretty much all have JavaScript capability installed by default. There are still a fair number of older systems still in use that don’t use JavaScript. As a result, they will never show up in Analytics reports.

Likewise, some more advanced users can change their settings to prevent JavaScript from ever affecting their browser (typically due to either privacy or performance concerns). So, if for whatever reason you need to have fully accurate information of exactly how many times your site has been accessed, GA is not going to cut the mustard.

On the other hand, GA might miss a large segment of your traffic if your audience is either extremely savvy (using custom computers) or un-savvy (using outdated technology). If you are concerned that this is the case with your site, you should probably look into a server-log based solution to supplement your site tracking.

How does anonymity limit tracking of on-site user interactions?

Because Google Analytics uses anonymous tracking, it doesn’t allow you to deeply track user-level interaction. For some sites, especially those that require users to sign up and log in, it’s important to understand how individual users move from page to page. It’s similarly important to know or how one session differed from another.

While you can get some of this information from a default GA setup, it can be much more difficult to track users who login from multiple devices. In such a case, it might be worthwhile to look into a solution such as Piwik.

How important are the limitations of Google Analytics?

The two Google Analytics limitations I previously mentioned aren’t really major drawbacks for most sites. There are plenty of reasons why the software is used by half of the world’s leading websites. 

At the end of the day, Google Analytics is a great tool to track user behavior on your website, and to assess the performance of Google Ads and search engine optimization (SEO). Businesses can easily set goals, measure conversion and conversion rates, and glean insights about site traffic and anonymous users travel around their websites. 

But for those interested in greater insights about user behavior and user experiences, the anonymity and somewhat surface-level data about on-site interactions, having a Google Analytics account alone may not be sufficient. Many businesses seeking greater data about user behavior and user experience often need to turn to supplemental tools.

Read more from our blog: