Docs

Product analytics

What the snippet captures once product analytics is on, the events it sends, and the reports built from them.

Product analytics answers questions about your whole product, not only your guides: which pages people open, what they click, where they get stuck and who comes back. It uses the snippet you already installed. There is no extra code to add.

Product analytics and session recordings are off for every workspace until an owner or admin turns them on in Settings → Data & privacy. Until then the snippet doesn't load this code. Data handling lists everything that is and isn't stored.

Turn it on

In the dashboard, open Settings → Data & privacy and switch on Product analytics. The change is written to the audit log and reaches pages within a minute. The snippet then loads one more small bundle, cueston-analytics.js, from the same place as cueston.js.

SettingWhat it does
Product analyticsPage views, time on page, clicks and friction signals.
Session recordingsSee Session recordings.
Hide all page textClick labels and page titles aren't stored; recordings show asterisks instead of text.
Only identified peopleNothing is captured until the page calls Cueston.identify().

Events the snippet captures

They are stored like the events you send with Cueston.track(). Their names start with $, which Cueston.track() refuses, so your own events can't collide with them.

EventWhenProperties
$pageviewOn load and on every route changepath, title, and referrer on the first page
$pageleaveWhen that page view endspath, activeMs, totalMs, scroll (furthest scroll, 0–100)
$clickA click on a button, link or form controlpath, tag, sel, and when available text, href, type
$rage_click3 or more clicks on one element within a second, at least two of which changed nothingSame as $click
$dead_clickA click on a button or link that changed nothing within 0.65 seconds: no change to the page, no navigation, no focus or scroll changeSame as $click
$error_clickA click followed within 1.5 seconds by an error message (role="alert", aria-live="assertive" or aria-invalid="true" appearing), or a submit the browser refuses because the form is invalidSame as $click
  • path is the page path with record ids replaced: /invoices/8841/edit becomes /invoices/:id/edit. Numbers, UUIDs and long generated ids are replaced; the query string is dropped. The full URL is kept on the event as its page URL.
  • activeMs counts time with input. A pause between two inputs counts for at most 30 seconds, and time in a background tab doesn't count.
  • sel is a short CSS selector that stays the same between page loads: a data-testid or a stable id when the control has one, otherwise its tag and classes.
  • text is the control's label, up to 80 characters: its aria-label, or the visible text of a button, link, tab or menu item. For a form field only the aria-label is used, never its value or what was typed. It is left out for labels that look like an email address or a long number, inside data-cueston-mask, and when Hide all page text is on.

A query-only change, such as a filter or a page number, doesn't start a new page view. If your router changes the path without the History API, call Cueston.page(): see Single-page apps.

Keep parts of a page out

HTML
<!-- The label is never stored; recordings show asterisks -->
<td data-cueston-mask>ada@example.com</td>

<!-- Clicks inside aren't captured; recordings show an empty box -->
<section data-cueston-block>…</section>

The classes cueston-mask and cueston-block do the same. What people type and the values of form fields are never captured, with or without these.

Reports

In the dashboard, under Insights:

ReportShows
TrendsVisitors, page views and friction signals for the period, and one event per day counted by events, people or sessions. Page events break down by page, clicks by control.
PagesThe 100 most viewed pages: views, visitors, median time on page, scroll depth, and rage, dead and error clicks.
TasksTask success and time on task for flows you define. See Tasks.
RetentionWeekly cohorts by the first time someone did an event, and how many came back each week after.
RecordingsSee Session recordings.

Periods are 7, 30 or 90 days, in UTC. People are the user ids you pass to Cueston.identify(); visitors you haven't identified are counted by their anonymous id.

Anyone with the analytics.view permission can open these reports. See Roles and permissions.

Limits and retention

  • Events are kept for 90 days, and the daily counts per person that Retention reads for 400 days. If your workspace retention is shorter, both follow it.
  • An event's properties are at most 1 KB.
  • Product analytics is included on every plan, with no event quota.
  • AI agents can read these reports through the MCP server: the overview, an event's trend, retention, tasks and their results, and links to session recordings. They aren't in the REST API yet.

On this page