What is Google Analytics?
A plain-language explainer for Swedish site owners. What the tool is, how it collects data, what it costs, and why more and more sites are moving away from it.
The short answer
Google Analytics is a free web analytics tool from Google. You add a small snippet of code to your website, and then you can see how many people visit the site, where they come from, which pages they look at and what they do before they leave. It is the most widely used analytics tool in the world and runs on a large share of all websites.
The current version is called Google Analytics 4, usually shortened to GA4. It replaced Universal Analytics, which stopped collecting data on July 1, 2023.
What Google Analytics measures
At its core, Google Analytics answers questions about your traffic. The most common ones are:
- How many people visit the site? Visitor and pageview counts over time.
- Where do they come from? Search engines, social media, ads, direct traffic or links from other sites.
- What do they do? Which pages they visit, how long they stay and where they leave.
- Do they convert? Goals and events, for example purchases, form submissions or downloads.
How it works technically
When a visitor loads your page, Google's script (gtag.js) runs in the browser. The script sets cookies (including _ga) to recognize the same visitor across multiple pages and visits, and then sends the information on to Google's servers for processing. That is where the reports you see in the GA4 interface are built.
Two things are worth understanding about that model. First, it requires cookies, which in the EU requires active consent. That is why almost every GA4 site has a cookie banner. Second, the data passes through and is processed by a US company, which is the core of the legal debate further down.
What Google Analytics costs
GA4 is free. The enterprise version, Google Analytics 360, is sold through Google Marketing Platform and typically costs six-figure amounts in US dollars per year, historically around 150,000 USD. Nearly all Swedish companies use the free version.
The tool being free does not mean it comes without cost. The cookie banner loses visitors, the data carries legal risk, and the script adds weight to every page load. We have run the numbers on the hidden costs in Spårlös vs Google Analytics.
Is Google Analytics legal in Sweden?
This is the question that has made GA4 controversial. In the summer of 2023 the Swedish data protection authority (IMY) found four Swedish companies liable because their GA4 use transferred personal data to the US in violation of GDPR. The EU-US Data Privacy Framework has since made GA4 technically legal again, but the framework is under legal challenge (Schrems III) and lawyers remain cautious.
The conclusion for most: GA4 can be used legally, but it requires a set of correctly configured things and you inherit a risk. We walk through the full picture, with a decision matrix and a checklist, in Is Google Analytics legal in Sweden in 2026? and keep the current IMY picture on our IMY page.
Alternatives to Google Analytics
If you want to skip the cookie banner and the third-country transfer, there are cookie-free, privacy-friendly tools: Plausible, Fathom, Matomo and Spårlös. They measure the same core numbers (visitors, sources, pages, goals) without cookies and without sending data to the US. As a bonus the cookie banner disappears, which often means you see more visitors than GA4 showed, because the people who used to reject the banner are now counted. More on that effect in the cookie-banner visitor loss.
Spårlös is the Swedish alternative: cookie-free, EU-hosted, with a DPA in Swedish, support in Swedish and invoicing to Swedish standards. For municipalities, regions, healthcare and B2B with Swedish procurement requirements, that carries weight.
Frequently asked questions
Is Google Analytics free?
Yes. Google Analytics 4 (GA4) is free to use. The enterprise version, Google Analytics 360, is sold through Google Marketing Platform and typically costs six-figure amounts in US dollars per year. Nearly all Swedish companies use the free GA4 version.
What is the difference between GA4 and Universal Analytics?
Universal Analytics (the old version) stopped collecting data on July 1, 2023 and has been retired. GA4 is its successor. It is built on an event-based data model instead of sessions and pageviews, and is designed to work across both web and app.
Does Google Analytics use cookies?
Yes. GA4 sets cookies in the visitor’s browser (including _ga and _ga_*) to recognize returning visitors. In the EU that requires active consent, which is why you see a cookie banner on almost every site running GA4.
Is Google Analytics legal in Sweden?
It can be, but under several conditions. In 2023 IMY found four Swedish companies liable because GA4 transferred personal data to the US in violation of GDPR. The EU-US Data Privacy Framework made it technically legal again, but the framework is under legal challenge. We walk through the full picture in a separate article.
What is a good alternative to Google Analytics?
Cookie-free, privacy-friendly tools like Plausible, Fathom, Matomo and Spårlös. They measure traffic without cookies, without a cookie banner and without sending data to the US. Spårlös is the Swedish alternative with a DPA, support and invoicing to Swedish standards.
Further reading: Is Google Analytics legal in Sweden in 2026? · Spårlös vs Google Analytics · Why Swedish companies are switching in 2026.