Skip to main content
SDKsWeb

Anonymous visitor id

Pre-login anonymous tracking and linking on identify for the web SDK.

On initialize, the web SDK resolves a stable anonymous visitor id:

  1. Reuse persisted id from localStorage
  2. Custom getVisitorId callback
  3. Internal crypto.randomUUID() fallback (default)
  4. FingerprintJS via lazy CDN import (only when opted in)

Disable with data-anonymous="false" or anonymous: { enabled: false }.

Pre-login events

Before identify, event() sends events with anonymousIdno audience user record is created.

window.motisig.event('page_viewed', { path: '/pricing' });

After sign-in

identify(userId) registers the real user with anonymousId and anonymousIdProvider attached. Pre-identify events remain on the anonymous record (no server-side merge today).

await window.motisig.identify(firebaseUser.uid, { email: firebaseUser.email });

Fingerprint opt-in

By default the SDK uses an internal UUID and does not load FingerprintJS. To enable it: script tag data-fingerprint="true" or anonymous: { optOut: false } in initialize options.