# Enhanced measurement

Enhanced measurement collects six families of events without a line of extra code — scrolls, outbound clicks, downloads, site search, forms and video. This page says exactly what each toggle sends, and what it costs you.

## What it is and where it is configured

Enhanced measurement is a set of ready-made listeners in the tracker that turn common behaviour into events. The configuration is held on the **data stream** and the tracker fetches it on every page load, so switching a toggle off never means touching your site's code.

1. Admin - Data streams.
2. Open your stream.
3. In the Events card, click the gear next to Enhanced measurement.
4. Set the toggles and Save.

## What each toggle produces

| Toggle | When it fires | Event name | Properties |
| --- | --- | --- | --- |
| Page views | Page load, and every real URL change in a single-page app | `page_view` | — |
| Scrolls | The first time the visitor reaches 90% of the document height | `scroll` | `percent_scrolled` |
| Outbound clicks | A click on a link pointing at a hostname other than the current page's | `click` | `link_url`, `link_domain`, `outbound` |
| File downloads | A click on a link whose extension is in the download list | `file_download` | `link_url`, `file_extension`, `link_text` |
| Site search | A page load whose URL carries one of the search parameters | `view_search_results` | `search_term` |
| Form interactions | The first focus into any form, and every form submit | `form_start`, `form_submit` | `form_id`, `form_name` |
| Video engagement | Start and end of playback of a browser video element | `video_start`, `video_complete` | `video_url` |

Each of these is a real, complete event: it appears in the Events report, you can promote it to a key event, and it counts toward your data volume.

## The details the table cannot hold

**Page views** has no off switch and is shown in the panel labelled "always on". It is also what installs the History hook for client-side routing. Its exact behaviour — and why you must not add a manual `ap('page')` — is in [page views in single-page apps](analytics/collect/spa-and-page-view).

**Scrolls** fires at most once per page load, and the listener is removed afterwards. That means `percent_scrolled` is always 90; you will never see 25 or 50. It is not re-armed on a single-page route change either — a full page load is needed before it can fire again.

**File downloads take precedence over outbound clicks.** If a link both points at another domain and carries a file extension, only `file_download` is recorded. The extension list is fixed: `pdf`, `doc`, `docx`, `xls`, `xlsx`, `ppt`, `pptx`, `zip`, `rar`, `7z`, `gz`, `tgz`, `dmg`, `pkg`, `exe`, `csv`, `txt`, `mp3`, `mp4`, `mov`, `avi`, `wav`. The link text is stored up to 80 characters.

**Site search** only inspects the URL of the page that loaded, and its default parameters are `q`, `s`, `query` and `search`. If your site search returns results in the background without changing the URL, this toggle sees nothing; send the event yourself with `ap('track', …)` in that case.

> **The search term is text a person typed**
>
> `search_term` stores whatever was in the search box, verbatim. If your visitors paste order numbers, phone numbers or national ID numbers into search, those values land in your events. Either switch the toggle off, or make sure your search page does not put such input in the URL.

**Form interactions** covers every form element on the page, not just the ones you care about. The header search box, the newsletter sign-up and the product filter are all forms, and the first click inside one produces a `form_start`. `form_start` fires once per form per page load; `form_submit` records every submit.

**Video engagement** has start and end only — no 25% or 75% milestones. And it hears the browser's own video element only; players inside an iframe are invisible to it.

## What it costs

There are three real costs, and it is better to accept them deliberately:

- **Event volume.** On a link-heavy shop, outbound clicks and downloads can outnumber page views. If your Events report has suddenly filled with `click`, this is why.
- **Noise in the reports.** `form_start` on forms nobody cares about, and `click` on every social link in the footer, crowd the event list without adding anything to a decision.
- **Data you did not choose.** The search term and the form name are read off the page, not defined by you.

A simple rule: keep a toggle on if you read a report for it or have built a key event on it. Switch the rest off.

## Two behaviours that surprise people

**The default is on.** A toggle counts as on until it is explicitly saved as off. The Enhanced measurement panel saves the state of every toggle together, which makes it the only reliable place to turn something off. The single switch you see while **creating** a stream does not replace it: after the stream exists, open the panel once and switch off — and save — what you do not want.

**A failed config fetch does not turn everything on.** If the tracker cannot fetch the configuration, it falls back to the last good one it cached in the browser. If there is none, it drops to the minimal-safe set: page views only, everything else off. A network glitch can therefore never re-enable something you switched off.

> **Everything here sits behind statistics consent**
>
> Every enhanced-measurement event passes the same gate as a page view: without consent for the statistics category none of them are sent, and under opt-in the default is closed. If you run the consent banner, expect to see a share of these events missing by design.

## What is not covered here

The enhanced-measurement listeners are attached once the configuration arrives, so a scroll or a click in that first fraction of a second can be missed. Do not lean on them for commercial events — sign-ups, add-to-cart, purchases. Send those with `ap('track', …)` or from your server, where the count is deterministic.

## Frequently asked questions

### Where do I turn a toggle off?

Admin - Data streams - open your stream - Enhanced measurement. Switch off what you do not want and save. The setting belongs to that stream, so two sites can have two different configurations.

### Why has Page views no off switch?

Because page-view counting is the base everything else sits on, and it is what installs the History hook single-page apps need. The panel shows it disabled and labelled "always on".

### Are YouTube and Aparat videos counted?

No. Video engagement only listens to the browser's own video element. A player loaded inside an iframe is out of reach of the page's script and produces no events.

### How long does a change take to apply?

The tracker fetches the configuration on every page load and the response is cacheable for about a minute. In practice new visits pick a change up within minutes; a page already open keeps the previous configuration until it is reloaded.

## Related

- [Data streams](https://docs.adpix.io/en/analytics/collect/data-streams/)
- [Page views and single-page apps](https://docs.adpix.io/en/analytics/collect/spa-and-page-view/)
- [The Events report](https://docs.adpix.io/en/analytics/reports/events/)
- [Key events](https://docs.adpix.io/en/analytics/collect/key-events/)

---

[Docs](https://docs.adpix.io/en/analytics/collect/enhanced-measurement/) · AdPix
