> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wendung.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Introduction

> What Wendung is, what the SDK does, and how events and pageviews flow from your app to the dashboard.

Wendung is funnel and web analytics from one browser SDK. You instrument steps with `@wendung/sdk` and the [dashboard](https://dashboard.wendung.app) 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: true` records 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 from `cdn.wendung.app` with one [script tag](/guides/script-tag).

## How data flows

1. `init()` configures the tracker and starts the flush timer.
2. 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).
3. Batches of up to 100 events are POSTed to `https://ingest.wendung.app/v1/events` with your publishable key in the `X-API-Key` header.
4. On page hide, the SDK drains the whole queue with `fetch` requests using `keepalive: true`, so delivery survives the tab closing.

## Next steps

<CardGroup cols={3}>
  <Card title="Quickstart" icon="bolt" href="/quickstart">
    Initialize the SDK and send your first event in under five minutes.
  </Card>

  <Card title="Events" icon="chart-line" href="/concepts/events">
    Learn how events are structured, queued, and delivered.
  </Card>

  <Card title="Pageviews" icon="eye" href="/concepts/pageviews">
    What a pageview carries and how sessions and normalized paths are derived.
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.