@wendung/sdk and the dashboard turns them into funnels, trends, segments, and per-user timelines. Turn on pageview tracking and the same SDK feeds web analytics for your sites: visitors, sessions, pages, sources, locations, and devices.
What the SDK does
- Tracks steps.
step(name, properties?)queues a named, timestamped event. - Identifies users.
identify(userId, traits?)attaches subsequent events to a user. - Tracks pageviews.
trackPageviews: truerecords page loads and client-side navigation with granted consent. Use'auto'to also count aggregate pageviews while consent is pending. Register the hostname as a site and the dashboard reports on it. - Batches and retries. Events flush every 5 seconds or when the queue reaches 50 events (both configurable). Server errors and network failures are retried.
- Runs in the browser. The package has no import-time side effects, but call
init()and tracking methods from client code. Sites without a build step load the same SDK fromcdn.wendung.appwith one script tag.
How data flows
init()configures the tracker and starts the flush timer.- Each
step()call, and each pageview when tracking is on, snapshots the current identity, session ID, and page context, then queues the event in memory (capacity 1000). - Batches of up to 100 events are POSTed to
https://ingest.wendung.app/v1/eventswith your publishable key in theX-API-Keyheader. - On page hide, the SDK drains the whole queue with
fetchrequests usingkeepalive: true, so delivery survives the tab closing.
Next steps
Quickstart
Initialize the SDK and send your first event in under five minutes.
Events
Learn how events are structured, queued, and delivered.
Pageviews
What a pageview carries and how sessions and normalized paths are derived.