> ## Documentation Index
> Fetch the complete documentation index at: https://www.usenotra.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Web analytics

> See the people visiting your site: visitors, page views, top pages, referrers and UTM campaigns, countries, devices, outbound links and Core Web Vitals, next to your AI traffic.

Web analytics counts the people who read your site: how many came, which pages they opened, where they came from and how fast your pages loaded for them. Because Notra also tracks AI traffic, it shows how many of those people arrived from an AI answer such as ChatGPT or Perplexity, and what they did next.

Web analytics is included in every workspace, and the script sets no cookies and stores nothing in the browser.

![Web analytics tab with visitors, page views, time on page, a daily trend chart, top pages and sources](https://mintcdn.com/notra/9v18KDF0zvYQU4vM/images/ai-traffic/web-analytics-light.webp?fit=max\&auto=format\&n=9v18KDF0zvYQU4vM\&q=85\&s=01218e3892c2fed70871d0dcfc525988)

## Start counting visitors

**1. Add notra.js to your site**

The `notra.js` script tag counts visitors, as does `@usenotra/sdk` in React, Next.js and Astro, and [Script tag](https://www.usenotra.com/docs/analytics/install/script-tag.md) walks you through adding it. Sites hosted with [Notra Sites](https://www.usenotra.com/docs/sites/overview.md) already load `notra.js`, so you can skip this step for them.

**2. Visit your site**

Until the first page view arrives, the **Web** tab shows the install panel with **Awaiting first page view…** and switches to **Receiving page views since …** once your first visit arrives.

**3. Import your history (optional)**

To fill in the months before you installed the script, import them from Plausible, Vercel Web Analytics, Cloudflare, Rybbit or Databuddy. See [Import your history](https://www.usenotra.com/docs/analytics/import-history.md).

The server tracker and log drains only record AI traffic, because they can't tell a person from a bot that sends a browser user agent. To see both, install `notra.js` for people and a [server tracker](https://www.usenotra.com/docs/analytics/overview.md#supported-frameworks) or [log drain](https://www.usenotra.com/docs/analytics/overview.md#log-drains) for AI crawlers, and Notra doesn't count anything twice.

## Open web analytics

Open **Analytics** in the sidebar, then the **Web** tab. The **Agent** tab next to it shows [AI crawlers and referrals](https://www.usenotra.com/docs/analytics/overview.md).

At the top of the page you can narrow everything below:

* **Date range**: **Today**, **Yesterday**, **Last 7 days**, **Last 14 days**, **Last 30 days** (the default), **Last 90 days**, **Year to date** or a custom range of up to 366 days.
* **Domain**: shown when the project tracks more than one domain or has Notra Sites traffic. Pick one domain, or choose **Without Notra Sites** to leave your Sites out.
* **Filter**: pick a page to see only its visits, matched on the exact path.

The **…** menu next to **Filter** has **Download CSV**, **Embed on your site**, **Tracking setup** and **Import history**.

## Visitors and page views

The four numbers at the top compare the selected range with the previous period of the same length.

| Metric | What it counts |
| - | - |
| **Visitors** | Unique visitors per day, added up over the range |
| **Page views** | Every page that was opened, not counting 404 pages |
| **From AI answers** | Visitors who arrived from an AI assistant such as ChatGPT, Perplexity, Claude or Gemini |
| **Avg. time on page** | How long a page stayed visible on screen, on average |

The chart below shows page views per day and draws today as unfinished until the day ends. If you imported history, a marker such as **Plausible → Notra** shows the first day Notra counted on its own.

## Top pages and sources

**Top pages** lists the pages with the most views, with the visitors who came **From AI** in a separate column. When the project tracks more than one domain, each page shows its host.

**Sources** shows where sessions started. Switch it between:

* **Referrers**: the sites that linked to you, grouped into names such as Google, X, LinkedIn, ChatGPT or Perplexity. Visits without a referrer count as **Direct**, and visits between your own pages don't count as a source.
* **UTM parameters**: the **Source**, **Medium**, **Campaign**, **Term** or **Content** of links tagged with `utm_` parameters. Campaign, term and content values that look like an email address, an ID or a token show as `:id`.

## Countries, devices and AI visitors

![Countries and Devices tables above the What AI visitors do table](https://mintcdn.com/notra/9v18KDF0zvYQU4vM/images/ai-traffic/web-analytics-breakdowns-light.webp?fit=max\&auto=format\&n=9v18KDF0zvYQU4vM\&q=85\&s=37d7123b5efb3cea23653f42195fb76c)

* **Countries** counts visitors per country, which Notra looks up on its own servers, and **Unknown** means the country couldn't be determined.
* **Devices** splits visitors into **Desktop**, **Mobile** and **Tablet**. **Unknown** appears for imported days whose source didn't record a device.
* **What AI visitors do** compares people who came from each AI assistant with **All visitors**. **Pages per visit** is the average number of pages in a session, and **Read further** is the share of sessions that opened at least two pages.

## Outbound links, languages and performance

`notra.js` also reports a few things a server can't see:

* **Outbound links**: clicks on links to other sites, by host and path, without query strings.
* **Languages**: visitors by their browser's main language.
* **Web vitals**: how fast your pages load and respond for real visitors.
* **JavaScript errors**: uncaught errors, if you turned on **Report JavaScript errors** when you copied the script tag, and this card only appears when there are errors.

![Web vitals card with LCP, INP, CLS, FCP and TTFB rated Good or Needs improvement](https://mintcdn.com/notra/9v18KDF0zvYQU4vM/images/ai-traffic/web-analytics-vitals-light.webp?fit=max\&auto=format\&n=9v18KDF0zvYQU4vM\&q=85\&s=eef30f4e3119bf41abfefc3c124560c6)

**Web vitals** shows the 75th percentile of each metric, rated **Good**, **Needs improvement** or **Poor** with Google's thresholds, and the share of page views in each band:

| Metric | Good | Poor |
| - | - | - |
| Largest Contentful Paint (LCP) | 2.5 s or less | over 4 s |
| Interaction to Next Paint (INP) | 200 ms or less | over 500 ms |
| Cumulative Layout Shift (CLS) | 0.1 or less | over 0.25 |
| First Contentful Paint (FCP) | 1.8 s or less | over 3 s |
| Time to First Byte (TTFB) | 800 ms or less | over 1.8 s |

When both mobile and desktop visits have data, switch between **All devices**, **Mobile** and **Desktop**.

## Export and share

* **Download CSV** saves one row per day with human page views, human visitors, AI crawler visits and AI referral visits for the selected range and page.
* **Embed on your site** puts live visitor charts on your own website. See [Embed analytics](https://www.usenotra.com/docs/analytics/embed.md).

## How Notra counts

* **Visitors** are recognized by a hash of the IP address and user agent, salted with a random value that changes every day and is deleted after 48 hours. Notra never stores the IP address and can't follow a visitor from one day to the next, so visitors over a range are the sum of each day's unique visitors.
* **Sessions** end after 30 minutes without a page view. A visit that arrives from a different outside source, for example from Google after an earlier visit from ChatGPT, starts a new session.
* **Left out**: known bots, headless browsers, page-speed tools such as Lighthouse, prefetches, redirects and requests for files such as `robots.txt`, `sitemap.xml` or `llms.txt`.
* **Paths** are stored with any segment that looks like an email address, a UUID, a number of four or more digits or a token replaced by `:id`.
* **Numbers refresh on their own** while the tab is open. Page views arrive in batches, so a new visit can take a few minutes to show up.

For everything the script sends and stores, see [What is sent](https://www.usenotra.com/docs/analytics/install/script-tag.md#what-is-sent).

## Notra Sites

Every Notra Site counts its visitors with `notra.js`, served from the site itself, and its traffic appears on the **Web** tab together with your other domains. A Site's own **Analytics** page shows the same numbers for that Site alone.

The same person on a Site and on your main domain counts as two visitors, because Notra recognizes visitors per Site.

## Reading web analytics from the API

`GET /v1/projects/{projectId}/geo/traffic/web`, `/geo/traffic/web/breakdowns` and `/geo/traffic/web/utm` return the data on this tab, including `sessions` and `engagedSessions`, which the dashboard doesn't show. They need `traffic.read`. See [Reading website analytics from the API](https://www.usenotra.com/docs/analytics/overview.md#reading-website-analytics-from-the-api).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.