How does Google Analytics collect data?

Image of Iron Brands

Published on Apr 14, 2023 and edited on Jan 3, 2024 by Iron Brands

66% of the websites on the internet use an analytics tool, and more than 86% of those use Google Analytics. Most people have heard of Google Analytics, but how does it really work?

To find out what Google Analytics can do for your business, it's vital to understand the basic concepts and inner workings.

In this article, we’ll dig a bit deeper into this matter and answer valuable questions concerning the data collection practices of Google Analytics.

  1. How does Google Analytics collect data?
  2. What data points does Google Analytics collect?
  3. What metrics does Google Analytics collect?
  4. What are cookies, and why are they important?
  5. What data does Google Analytics not collect?
  6. Does Google Analytics collect personal data?
  7. Is Google Analytics difficult to use?
  8. What are the differences with privacy-friendly analytics in terms of data collection?
  9. Are data transfers an issue for privacy-friendly tools?
  10. What else should you look for in a privacy-friendly analytics service?
  11. Conclusion
Logo of MichelinMichelin chose Simple AnalyticsJoin them

How does Google Analytics collect data?

Google Analytics collects data through short lines of Javascript or HTML code called tags. These tags are placed on a web page and collect data points when triggered by a specific event- for example, when a visitor views a page, clicks on a link or plays an embedded video.

Google Analytics processes data points to provide customers with metrics. Metrics are aggregate data that give useful information about the performance of their website. For instance, page views are used to count visits, and these data are then aggregated to show a customer how many times their website was visited within a day, week, or month. This allows the customer to know whether their traffic is growing or shrinking.

Google Analytics organizes metrics into reports to give the customer an overview of the performance of their website. Customers can also customize reports to get an overview of the metrics they deem the most important for their website.

What data points does Google Analytics collect?

Google Analytics tracks various hits (or datapoints), including pageviews, events, and transactions.

Pageviews are the most basic type of hits. They represent a user visiting a page on your website. Every time a user loads a page on your website, a pageview hit is recorded in Google Analytics.

Events are user interactions with specific elements on your website, such as clicking on a button or playing a video. You can use events to track user behavior and get more detailed insights into how visitors interact with your website.

Transactions are completed purchases or other conversions on your website. They represent the result of a user's journey on your website, and they are often used to measure the success of your website's performance. Transactions are mainly used by e-commerce websites, also known as e-commerce tracking.

Google Analytics also tracks other datapoints, such as social interactions, exceptions, and user timings.

What metrics does Google Analytics collect?

Google Analytics collects a wide range of metrics. Here are some of the most important:

  • User demographics: Google Analytics collects data about the age, gender, and interests of your users, as well as their location and language. This data is collected from third-party sources, such as Google's advertising network, and it is used to provide insights into the characteristics of your users. It is also highly privacy-invasive as you collect personal information on your website visitors. If you don’t need this, you can also look at other analytics tools that are more privacy-friendly.
  • Unique visitors: Google Analytics can tell whether a page view comes from a first-time or returning visitor. This metric can help you assess whether your audience is growing and which pages are the most successful in attracting new visitors to your website
  • Traffic sources: data is collected on the sources of your website traffic, including data about the search engines, websites, and social networks that are referring traffic to your website. This data helps you understand how people are finding your website.
  • Traffic channels: this metric is similar to traffic sources but not quite the same. Traffic channel is based on classifying traffic sources into different groups, such as organic search, direct traffic, referral traffic, and paid search.
  • Conversions and goals: the customer can set up specific goals in Google Analytics. Goals and conversion data are collected, including the number of times a goal is completed, the value of each goal, and the conversion rate for each goal.
  • Device and browser information: Type of devices, operating systems, and web browsers. This data can help optimize the user experience for different devices and browsers.
  • User engagement: GA collects data on how engaged your website visitors are, based on how many pages they view, the time they spend on each page, and the bounce rate (the percentage of users who leave your website after viewing only one page).
  • Campaigns and promotions: data about the campaigns that you are running for your website, including data about the keywords, ads, and landing pages that are associated with each campaign.

What are cookies, and why are they important?

Google Analytics is built around cookies. Cookies are little pieces of information that Google Analytics reads and writes on a user’s browser. Google Analytics cookies include unique identifiers- strings of numbers and letters unique to each cookie. Cookies allow Google Analytics to recognize a user through a known identifier.

Google Analytics allows piecing data points together by referring them to the same visitor. So cookies are very important because some metrics simply cannot be collected without them. This is why Google Analytics 4 still uses first-party cookies despite being advertised by Google as a cookieless tool.

For instance, knowing what pages attract the newest visitors to your website can be useful. But Google Analytics cannot tell you that without using cookies. It will still register each page view, but because it cannot link them with a unique ID, it will have no idea whether each page view came from a unique or a returning visitor.

That is not to say you cannot use Google Analytics without cookies. You can- it just won’t work very well because it won’t provide you with unique visitors and other important metrics. This is also why Google Analytics suffers greatly from the increasing popularity of ad blockers- browser plug-ins that prevent certain cookies from being written.

It is also worth mentioning that all analytics cookies, including Google Analytics, are considered non-essential cookies under European law and can only be placed with the user’s consent. This is why websites that use Google Analytics need a cookie banner for the European audience.

Some other data points can be collected without consent, provided their collection does not involve cookies. But these data points will give you an incomplete and inaccurate picture without cookies.

What data does Google Analytics not collect?

As a web analytics tool, Google Analytics cannot collect any data unrelated to your visitor’s online activity.

Additionally, Google Analytics Terms of Use prohibit customers from collecting personally identifiable information (PII). Google defines PII as information directly identifying a visitor, such as a name, username, email address, or phone number.

This does not mean that Google Analytics does not collect personal data. As Google’s own documentation points out, data that do not qualify as PII under Google’s policies may still qualify as PII or personal data under some privacy laws.

Does Google Analytics collect personal data?

The answer depends because every legal system defines personal data in its own way.

Under the GDPR, the unique identifiers found in Google Analytics cookies are personal data, as are the IP addresses collected by Universal Analytics. These data also qualify as personally identifiable information under US regulations such as the CCPA, HIPAA, and COPPA.

Other data points collected by Google Analytics are not personal data in and of themselves but might count as personal data under the GDPR when combined with other information that allows Google to single out a user among the rest of the Internet traffic. For instance: device data, language data, and OS are not, in and of themselves, personal data. But if only one person browses the Icelandic version of a website with a certain device and OS, all these data are personal data.

Is Google Analytics difficult to use?

Google Analytics is a complex tool. Adding tags to your website is relatively straightforward, as another Google service called Google Tag Manager can automate the process. However, setting up the tags to do exactly what you want requires some know-how and coding skills. Organizing custom reports is also complex since Google Analytics collects many data points by default, most of which are unneeded for many customers.

If you are looking for a more straightforward analytics tool that provides the insights you need in a straightforward dashboard, you might want to check out other tools like Simple Analytics instead.

What are the differences with privacy-friendly analytics in terms of data collection?

Not all alternatives to Google Analytics are privacy-friendly, and not all privacy-friendly analytics are equally privacy-friendly. For instance, Adobe Analytics collects similar data points to Google Analytics.

Fingerprinting-based analytics services can be even more invasive, as they combine browser and device data in a way that aggressively identifies visitors. Unlike cookies, fingerprinting techniques cannot be detected by visitors, which creates the potential for abuse.

Other analytics services are more privacy-friendly but still differ in what data points they collect and how they process them to preserve privacy. For instance, Piwik Pro and Google Analytics collect similar data points, but their cookies have more reasonable expiration dates. Others, like Plausible Analytics, do away with cookies entirely but still collect personal data like IP addresses.

We at Simple Analytics do not collect personal data at all. Instead, we rely on referrers to calculate crucial metrics such as unique visitors and traffic sources (you can learn more about this in our documentation).

Are data transfers an issue for privacy-friendly tools?

Since the Schrems II ruling of the EU Court of Justice, Google Analytics has come under fire from European privacy watchdogs because it transfers personal data to the US. These data transfers expose personal data to the risk of surveillance from US authorities, and Google does not have sufficient safeguards in place to eliminate this risk.

This is why the Austrian, French, Italian, Danish, and Finnish privacy authorities all took a stance against Google Analytics, and why Meta was fined for €1.2 billion.

The long legal saga around data transfers was temporarily halted by the adoption of a new data transfer framework between the EU and the US, but we don't expect this to last for long. Two such frameworks were already invalidated by the EU Court of Justice and the new frameworks will likely meet the same fate.

Are data transfers an issue for privacy-friendly alternatives to Google Analytics as well? It depends.

The core of Google’s legal troubles is that personal data are transferred to the US. Suppose a web analytics service collects personal data. In that case, you should carefully read its documentation and ensure that it is hosted in the EU/EEA and relies on European content delivery systems (CNS). In other words, data transfers are not an issue as long as the data does not leave the EU.

For services that require data transfers to non-EU/EEA countries other than the US, it’s a bit more complicated. Such services can also be GDPR compliant, depending on the country and on the safeguards in place. The rules are somewhat convoluted, you can check this blog if you’re curious.

On the other hand, if a service does not track users or collect personal data, then its location does not matter. Personal data do not fall under the GDPR and can be transferred anywhere.

We at Simple Analytics do not collect any personal data, so our customers don’t need to worry about data transfers at all. We are also EU-hosted and only rely on EU-based CDNs, just to be on the safe side.

What else should you look for in a privacy-friendly analytics service?

Data collection is not the only factor that makes a service privacy-friendly. Data disclosure policies are as important, if not more.

In fact, the aggressive tracking of visitors is not even the biggest problem with Google Analytics. The main problem is how Google monetizes the enormous amounts of personal information they collect through Google Analytics and other services by sharing them with advertisers.

If you are looking for a truly privacy-friendly service, closely check their data disclosure policy.

In case you’re wondering, Simple Analytics never shares your data with anyone.

Conclusion

Let’s be clear: Google Analytics has its pros. It is a good analytics software that collects many data points and provides fine-grained metrics. And within a certain amount of hits, it is free to use (more exactly: you pay with your data).

On the other hand, collecting many data points is a double-edged sword. There are countless tags, which makes it tricky to set them up the way you want. Reports are harder to organize, and it can be difficult to figure out which metrics are important to your organization and which are not.

More importantly, Google Analytics is a privacy disaster because of the aggressive tracking of users and because Google shares personal data with countless advertisers.

It is also not GDPR compliant, so it is practically banned from several EU Member States. And while it might be possible to use it in a  GDPR-compliant way, this goes beyond tweaking a setting or two. A GDPR-compliant implementation of Google Analytics is burdensome and severely limits the tool’s capabilities (we discussed this here).

Finally, Universal Analytics will soon be phased out, and UA users must move to Google Analytics 4. GA 4 is quite different from UA, which makes it a confusing tool for long-time UA users.

That’s a long list of negatives, isn’t it? That’s why many organizations could benefit from switching to a more user-friendly, privacy-friendly tool with no compliance issues.

We build Simple Analytics to be just that. Simple Analytics can provide your business with valuable insights without tracking visitors and collecting personal data. We believe web analytics and privacy do not need to be at odds with each other. If this sounds good to you, feel free to give us a try!

GA4 is complex. Try Simple Analytics

GA4 is like sitting in an airplane cockpit without a pilot license

Start 14-day trial