Autocapture
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.
Updated
Event names that start with $ are reserved for ClickClacks, so these never clash with your own events. Every event also carries the browser’s anonymous ID, its session ID and, once you’ve called identify, your user ID as $distinct_id.
$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 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. |
$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. |
{
"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 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
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
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,$osand$device: read from the user agent, which is then discarded.$source_idand$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_termandutm_content, and$click_id, which names the ad click IDs present (gclid,fbclid,msclkid) without keeping their values. They’re read from an event’spath, so they need the query string: withdata-query="off"there are none.
The events and properties reference lists every one with its possible values.
Never captured
- 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,passwordoremail, 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 has the full picture, including browser storage.
Turning parts off
- Click capture: switch off Autocapture clicks in the source’s Settings. The tracker stops sending
$clickand 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. - One element’s text: mark it
data-cc-mask. - Everything, for one visitor: opt them out.
Next steps
- Custom events: add the events autocapture can’t see, like a sign-up or an upgrade.
- Single-page apps: how route changes become pageviews.
- Examples: real questions, what autocapture answers on its own, and the custom event for the rest.