Every visit to your site leaves traces: where the person came from, which pages they opened, how long they stayed, and whether they did what the site is for, such as buying, signing up or getting in touch. Web analytics is the practice of collecting those traces and reading them. The point isn't the numbers themselves. It's to answer questions like "which pages bring customers?" and "where do people give up?"
The best-known tool is Google Analytics. Others include Adobe Analytics, and privacy-focused or self-hosted tools such as Matomo.
What it tells you
Most analytics work answers four kinds of question:
- Acquisition: how do people find you? Search, ads, social media, email, links from other sites, or typing your address. See web traffic and referral websites.
- Behavior: what do they do? Which pages they see, how long they stay, where they leave.
- Conversion: do they do what you want? Purchases, sign-ups, form submissions, downloads. See conversion rate.
- Audience: who are they? Device, country, language, new or returning.
How the data is collected
There are two main methods, and many setups use both.
| Page tagging | Server log analysis | |
|---|---|---|
| How it works | A JavaScript snippet on each page sends data to the analytics tool when the page loads or an event happens | Software reads the log file your web server writes for every request |
| Sees clicks, scrolls, video plays | Yes, as events | No, only requests for files |
| Sees search engine bots | Usually not, since most bots don't run the script | Yes |
| Misses | Visitors who block the script or decline consent | Pages served from a cache without reaching your server |
| Setup | Add the tag, often with Google Tag Manager | Access to the server logs |
For SEO, both have a role. Tag-based analytics shows what visitors from search do on your site. Log file analysis shows what Googlebot crawls, which a tag can't.
The core metrics
Definitions vary by tool. These are the ones Google Analytics 4 uses, since it's the most common:
- Users: people, or more precisely browsers and devices, identified usually by a cookie. The same person on a phone and a laptop counts as two users unless they sign in. See unique visitors.
- Sessions: a visit. In GA4 a session ends after 30 minutes without activity by default, and you can change that timeout. One user can have many sessions.
- Views: pages or app screens seen. See page views.
- Engaged sessions: sessions that last longer than 10 seconds, include a key event, or include two or more page views (Google Analytics Help).
- Engagement rate and bounce rate: the share of sessions that were engaged, and the share that weren't. They always add up to 100%.
- Key events: the actions you mark as important, such as a purchase or a lead form.
If you learned analytics in Universal Analytics, note that its bounce rate meant something different: the share of single-page sessions, however long people stayed on that page. Universal Analytics stopped processing data on July 1, 2023, and GA4 replaced it. See bounce rate.
Why your numbers never match exactly
Two tools rarely agree, and that's normal. Common reasons:
- Different definitions. A Google Search Console click is counted on Google's side when someone clicks a result. An analytics session is counted only if your tag runs on the page.
- Blocked tracking. Ad blockers, browser privacy features and declined cookie banners stop some tags from firing. With consent mode, Google Analytics can estimate some of the missing behavior from visitors who did consent.
- Bots. Some automated traffic runs scripts and gets counted; most tools filter known bots, but not all.
- Time zones and attribution settings differ between tools.
Use analytics for trends and comparisons: this month against last, one page against another. Don't treat any single number as an exact count.
Using web analytics for SEO
A simple workflow for search traffic:
- Isolate organic search. Filter to the organic search channel so ads and email don't blur the picture. See organic search.
- Find your landing pages. Which pages do search visitors arrive on? Those are your top pages for SEO.
- Check what those visitors do. A page with lots of search traffic but a low engagement rate may not match the search intent behind its queries.
- Tie traffic to results. Count key events from organic visitors, not only sessions. A page with less traffic that brings sign-ups can matter more than a popular one that doesn't.
- Pair it with Search Console. Analytics shows what happens after the click; Search Console shows the queries, impressions and rankings before it.
Tag your own campaign links with UTM parameters so email, social and partner traffic is labeled correctly and doesn't land in the wrong channel.
Setting it up well
- Decide what success means first. List the actions that matter and mark them as key events. Without that, you'll have plenty of traffic data and no answers.
- Exclude your own visits and test traffic.
- Handle consent properly. In many countries, analytics cookies need the visitor's consent first. See GDPR.
- Check the setup after site changes. A redesign or new template can drop the tag from some pages without anyone noticing.
- Segment. Averages hide a lot. Compare mobile with desktop, new with returning, one country with another.