A page or screen was viewed. The tag writes one per navigation.
| Field | Value |
|---|---|
| Name | page_view |
| Severity | 9 (INFO) |
| Written by | Browser tag automatically. Every SDK when you call page(). |
| Turned off by | data-auto-page="false", which stops the single-page-app half. The first view of a document is always written. |
The tag writes one as soon as it has consent, and one on every history change where the path actually moved. Frameworks call replaceState constantly for scroll restoration, shallow query updates and prefetch bookkeeping, and counting those would be counting nothing.
A change of query string or fragment is therefore not a page view. Filtering a list twelve times is one page view, which is the number somebody reading a top-pages board wants.
On a server or in a desktop app there is no navigation to observe, so you call page(path) yourself and url.path is the only attribute filled in for you.
| Attribute | Type | What it holds |
|---|---|---|
| url.full | string | The whole URL, query string and fragment included. |
| url.path | string | The path alone. What a breakdown by page groups on, because a query string turns one page into a thousand rows. |
| firstrun.referrer | string | The full referring URL. Absent when the browser sent none. |
| firstrun.referrer.host | string | The referring host alone. Absent when there was no referrer. |
| firstrun.utm.source | string | utm_source, read off the landing URL. Absent when the parameter is not there. |
| firstrun.utm.medium | string | utm_medium, same rule. |
| firstrun.utm.campaign | string | utm_campaign, same rule. |
Every entry also carries the resource its client sends once per batch: session.id, user.id once you have called user(), and the rest of the list on the overview. Anything you pass yourself lands in the same map, and your key wins on a collision.
No page title, no viewport size, no scroll position, and nothing about what the reader then did. How long they stayed is page_leave, and it is a separate entry.
firstrun.utm.term and firstrun.utm.content are conventional keys the tag does not read. Pass them yourself if your campaigns use them.
A widget is a filter, a group by, an aggregate, a time bucket and a limit. These are those five parts written out, and every one of them is something you can build yourself.
| Question | The query |
|---|---|
| Which pages are read | Name is page_view . group by url.path . count of entries . limit 20 |
| Where people arrive from | Name is page_view . group by firstrun.referrer.host . count of entries |
| Which campaign brought them | Name is page_view . group by firstrun.utm.campaign . count of uniques |
| Traffic over time | Name is page_view . count of entries . bucket by day |
| Landing pages only | Name is page_view . firstrun.referrer.host is not set . group by url.path |