Identity and collection choices
Daily mode: the default
The collector derives a keyed hash from the UTC date, project, registered site, request IP, and user agent. It stores the derived hash, not raw IP or user agent, with analytics events. It rotates at UTC midnight. The SDK uses no analytics cookies, localStorage, or sessionStorage in this mode.
Optional Attribution mode
A project administrator must enable Attribution mode and acknowledge processing. Your SDK must also provide an explicit visitor-consent callback. Only when both gates are satisfied does it read or create a project-scoped UUID in first-party localStorage, with a 90-day expiry. No analytics cookies are set. The collector namespaces this ID per project; the daily session hash still rotates at UTC midnight.
Call setConsent(false) when consent is withdrawn. The SDK deletes its stored ID and removes persistent identity from queued events. Blocking browser storage falls back to daily mode. Disabling project Attribution mode makes the collector ignore incoming persistent IDs; it does not erase already stored analytics history. Deletion and retention controls require a separate workflow.
Visitor counts and retention
Anonymous visitor metrics count daily IDs, so someone returning tomorrow counts again. Weekly retention uses explicit account IDs and unambiguous consented browser links. It does not treat daily fingerprints as lifetime identities.
Accounts and traits
Call identify(userId, traits) after a fresh authenticated load; the explicit user ID stays in SDK memory. Scalar traits merge by key in Tinybird. Same-day anonymous activity may join an unambiguous identified account; Attribution mode can also join consented earlier days. Shared-browser histories linked to multiple accounts are left unassigned. Call clearUserId() on logout to discard queued identity and replace the consented browser ID.
Revenue identity
Signed Stripe or Paddle events supply invoices, refunds, and subscription snapshots. Link them with provider metadata user_id or identify traits stripe_customer_id / paddle_customer_id. Email similarity is not used to guess a billing match. Unmatched revenue remains visible; currencies are kept separate.
Event data and replay
Page events include origin, path, title, external referrer origin, sanitized UTMs and supported ad click IDs. Full query strings and fragments are omitted. Custom properties and traits are supplied by site owners. Optional Web Vitals and separately enabled session replay have their own payloads; replay text and inputs are masked by default.
Consent and operational data
Cookie-free collection does not establish a universal consent exemption. Site owners should evaluate their collection choices and applicable requirements. Review infrastructure logs, queue retention, custom properties, and deletion policies separately.
Installation and consent examples · Daily-ID example · Replay collection