PureStats documentation

Retention analytics

Measure new and returning visitors, visit frequency, cohorts, and product stickiness in PureStats.

Retention analytics explains whether people return after their first visit. Open Analytics → More → Retention to compare new and returning visitors, inspect visit frequency, review daily or weekly cohorts, and monitor DAU, WAU, MAU, and DAU/MAU stickiness.

PureStats uses the strongest privacy-safe identity available for a site. An optional pseudonymous user identity takes precedence, followed by the first-party visitor identity used for cross-domain tracking, and finally the regular anonymous daily visitor identity. Raw user IDs are never stored.

Identify signed-in users

Call identify before the initial pageview when your application already knows a stable internal user ID:

<script>
  window.purestats = window.purestats || function () {
    (window.purestats.q = window.purestats.q || []).push(arguments)
  }
  purestats('identify', 'internal-user-42')
</script>
<script defer data-domain="example.com" src="https://purestats.io/pf.min.js"></script>

The identifier is transmitted to PureStats and immediately transformed with a site-specific HMAC. It is not written to logs or analytics tables. Do not send an email address, name, phone number, or any other directly identifying value. Use an opaque internal ID.

Reset the identity on logout or account switching:

purestats('resetIdentity')

You can also use purestats.identify(id) and purestats.resetIdentity() after the tracker has loaded.

Historical coverage

Existing pageviews are backfilled into visitor profiles and daily activity. The coverage notice on the Retention page states the first and last included date and whether data came from the native tracker, a backfill, or both. Retention reports never create synthetic sessions or modify historical pageviews.