# Autocapture

> Exactly what the ClickClacks tracker captures without any code: $pageview, $click and $scroll events, every property they carry, what is added on arrival, and what is never captured.

- Canonical URL: https://clickclacks.io/docs/autocapture
- Section: Tracking
- Last updated: 2026-09-26

With the script tag on the page, three events arrive without any code: pageviews, clicks and scroll depth. Here is every property they carry, and what the tracker leaves out.

Event names that start with `$` are reserved for ClickClacks, so these never clash with [your own events](https://clickclacks.io/docs/events.md). Every event also carries the browser’s anonymous ID, its session ID and, once you’ve called [identify](https://clickclacks.io/docs/identify.md), your user ID as `$distinct_id`.

## $pageview {#pageview}

Sent when the page loads, and whenever the URL changes in a single-page app (`history.pushState`, `history.replaceState` and the back and forward buttons). A URL that hasn’t changed isn’t counted twice.

| Property | Meaning |
| --- | --- |
| `path` | The page path and query string, with [sensitive parameters](https://clickclacks.io/docs/privacy.md#urls) removed. Never the `#fragment`. Without the query string when the tag has `data-query="off"`. |
| `referrer` | First pageview of a page load only: the referring URL, scrubbed the same way. Empty for direct visits. |
| `$carried_from` | First pageview only, when the visitor arrived by a link from another of your listed domains: that domain. See [one person across domains](https://clickclacks.io/docs/domains.md#across-domains). |

## $click {#click}

Sent on any click. The tracker walks up from the clicked element to the nearest link or button and records that; if there isn’t one, it records the element that was clicked.

| Property | Meaning |
| --- | --- |
| `path` | The page the click happened on, as for `$pageview`. |
| `target_tag` | The element’s tag name, lower case: `a`, `button`, `div`… |
| `target_id` | The element’s `id`, when it has one. |
| `target_classes` | Up to its first two class names. |
| `target_text` | Links and buttons only: up to 40 characters of visible text, with whitespace collapsed. Never recorded inside a form field, anything editable or anything masked. |
| `sel` | A short selector, at most 64 characters: `#id`, or the tag with its first two classes, or `tag:nth-of-type(n)`. |
| `x_pct` | Horizontal position as a percentage of the page width, to one decimal. |
| `y_px` | Vertical position in pixels from the top of the page. |
| `vw` | The viewport width in pixels. |

```json
{
  "name": "$click",
  "properties": {
    "path": "/pricing?utm_source=newsletter",
    "target_tag": "a",
    "target_id": "start-trial",
    "target_classes": ["btn", "btn-primary"],
    "target_text": "Start your free trial",
    "sel": "#start-trial",
    "x_pct": 62.4,
    "y_px": 1180,
    "vw": 1440
  }
}
```

The position and viewport width are what [heatmaps](https://clickclacks.io/features/heatmaps) draw from. Clicks on links between your listed domains also get a `_ccid` parameter added to the link, which carries identity to the next domain.

## $scroll {#scroll}

One per page view, sent when the visitor leaves the page, switches tab, or moves to another route in a single-page app. It records how far down they got.

| Property | Meaning |
| --- | --- |
| `path` | The page that was scrolled. |
| `max_y_px` | The lowest point seen, in pixels: the scroll position plus the viewport height, capped at the page height. |
| `doc_h` | The page height in pixels. |
| `vw` | The viewport width in pixels. |

## Added on arrival {#on-arrival}

ClickClacks adds these on its servers. You can’t set them from the browser; values you send under these names are replaced.

- `$country`: the two-letter country, from Cloudflare’s network. Left out when unknown.
- `$browser`, `$os` and `$device`: read from the user agent, which is then discarded.
- `$source_id` and `$ingest_host`: which source the event came in through, and on which host.
- `$ip`: only when the source has **Record IP address** switched on. It’s off by default.
- Campaign properties read from the page’s query string: `utm_source`, `utm_medium`, `utm_campaign`, `utm_term` and `utm_content`, and `$click_id`, which names the ad click IDs present (`gclid`, `fbclid`, `msclkid`) without keeping their values. They’re read from an event’s `path`, so they need the query string: with `data-query="off"` there are none.

The [events and properties reference](https://clickclacks.io/docs/properties.md) lists every one with its possible values.

## Never captured {#never}

- **What people type.** No keystrokes, form values or field contents, in events or in heatmap captures.
- **Page text,** apart from the 40 characters of a clicked link or button label.
- **Sensitive URL parameters** such as `token`, `password` or `email`, and the `#fragment`.
- **Cookies.** The tracker sets none and sends requests without credentials.
- **Session recordings.** ClickClacks doesn’t record sessions or mouse movement.
- **The raw user agent and IP address,** unless you switch IP recording on for a source.

[What’s collected](https://clickclacks.io/docs/privacy.md) has the full picture, including browser storage.

## Turning parts off {#turn-off}

- **Click capture:** switch off **Autocapture clicks** in the source’s **Settings**. The tracker stops sending `$click` and the server drops any that arrive. Pageviews and scroll depth carry on.
- **Query strings:** add `data-query="off"` to the script tag.
- **Heatmap captures:** add `data-capture="off"`, or turn capture off in [Heatmap capture](https://clickclacks.io/docs/heatmap-capture.md).
- **One element’s text:** mark it `data-cc-mask`.
- **Everything, for one visitor:** [opt them out](https://clickclacks.io/docs/consent.md).

## Next steps {#next}

- [Custom events](https://clickclacks.io/docs/events.md): add the events autocapture can’t see, like a sign-up or an upgrade.
- [Single-page apps](https://clickclacks.io/docs/single-page-apps.md): how route changes become pageviews.
- [Examples](https://clickclacks.io/docs/examples.md): real questions, what autocapture answers on its own, and the custom event for the rest.
