Documentation / Concepts

Inert by default. Explicit on start.

The collector is a reviewed ES module served as /trace.js. Importing it touches nothing; collection starts only when your consent flow calls start with the literal consent value.

Last updated

The lifecycle

trace.jsInstall, start, stop
import { createSiteCollector } from 'https://app.volance.com/trace.js';

const collector = createSiteCollector({ fingerprints: false });

collector.start({ consent: true }); // idempotent; literal consent required
const evidence = collector.stop(); // { clientSignals, events }
  • Inert construction. Import and construction set no listeners, timers, network calls, or storage.
  • Bounded collection. At most 256 events and 10 minutes per run.
  • Clean stop. Listeners are capture-phase and removed on stop; the snapshot is returned and state is cleared.

What it captures, and what it never reads

The default tier. The fingerprint tier is separate and opt-in.
CapturedExamplesNever captured
Event type and timingpointerdown, keydown, scroll, elapsed msKey identities, characters, input values
Pointer and touchCoordinates, deltas, pressure, wheel distanceElement text or identity; page URLs
Keyboard cadenceCount, dwell and flight timingWhich keys were pressed; clipboard contents
Coarse environmentDisplay size, device class, platform, timezonePage content; cross-site identifiers

The fingerprint tier

The fingerprint tier — WebGL renderer, canvas probe, installed-font count — is real fingerprinting. It runs only when the integrating site passes { fingerprints: true }, and the server drops the fields unless the workspace setting is enabled. Default: off.

The collector does not render a banner or infer consent from a click. start({ consent: true }) is a signal from your application that your consent flow has completed. If consent is withdrawn, call stop() and discard the snapshot. The data page covers retention and the notice.

Allowed origins and the relay

Allowed origins are configured per project. When the list is non-empty, a browser-originated manifest request from a different Origin is refused with 403. Server-to-server calls are not origin-gated. That keeps the public key from being reused on a site you do not control, but it does not replace the secret-key boundary.

The collector has no network or credential code. It hands evidence to your page, your page sends it to your same-origin relay, and the relay calls POST /api/trace/score with sk_. Never send browser telemetry directly to a secret-authenticated endpoint.

SPAs and CSP

  • SPA routes: start when the interaction you care about begins and stop on submit. A collector left running across a long session hits the 10-minute cap.
  • CSP: if you set script-src, allow https://app.volance.com. A blocked module fails in the console.
  • Pinning: /trace.js is a short-cache alias. Content-hashed copies are immutable if you need an exact version.
  • Blockers: an ad blocker can prevent the module from loading. Your backend must handle missing or partial evidence.

What it cannot see

A client that never runs JavaScript is never measured by a page collector. That is the boundary of the surface, not a bug to tune around. For non-JS and server-to-server traffic, score the request at your edge instead. The score endpoint accepts requestSignals for exactly that case.

Related

Free to start. 10,000 scores a month, one project, no credit card.

Get started free