# Wendung - [Quickstart](https://docs.wendung.app/quickstart.md): Install the SDK, call init() with your API key, track your first funnel step, and turn on pageviews. Setup takes about five minutes. - [Agent setup](https://docs.wendung.app/agents.md): Let your AI coding agent add Wendung to your project with one pasted prompt. - [Introduction](https://docs.wendung.app/introduction.md): What Wendung is, what the SDK does, and how events and pageviews flow from your app to the dashboard. - [Events](https://docs.wendung.app/concepts/events.md): Events, called steps, are named, timestamped records of user actions. How to track them, what the payload looks like, and how to name them. - [Identity: identify() and reset()](https://docs.wendung.app/concepts/identity.md): How identify() ties events to a user, what traits ride along on every event, and how sessions and reset() fit together. - [Pageviews and sessions](https://docs.wendung.app/concepts/pageviews.md): What a pageview carries, how pageviews become sessions, how path normalization works, and what is never collected. - [Batching and flushing](https://docs.wendung.app/concepts/batching.md): Events are queued in memory and sent in batches. The flush triggers, the retry rules, and when to flush by hand. - [Funnel tracking](https://docs.wendung.app/guides/funnels.md): Model a user journey as named step events, attach traits with identify(), and read conversion and drop-off per stage in the dashboard. - [Web analytics setup](https://docs.wendung.app/guides/web-analytics.md): Turn on pageview tracking, register your site, clean up paths, and read the site dashboard. - [Next.js (App Router)](https://docs.wendung.app/guides/nextjs.md): Add the SDK to a Next.js App Router project: initialize it in a client provider, track funnel steps, identify users, and turn on pageviews. - [React SPA (Vite, CRA, React Router)](https://docs.wendung.app/guides/spa.md): Add the SDK to a React single-page app: initialize once at startup, identify users after login, and turn on pageviews for React Router navigations. - [Static sites and the script tag](https://docs.wendung.app/guides/script-tag.md): Add Wendung to a site without a build step: one script tag from cdn.wendung.app initializes the SDK, tracks pageviews, and exposes Wendung for step calls. - [Analytics consent](https://docs.wendung.app/guides/consent.md): Choose whether to collect aggregate pageviews while consent is pending, start full analytics after consent, and stop on withdrawal. - [init() options](https://docs.wendung.app/configuration/options.md): Reference for every option accepted by Wendung.init(): apiKey, endpoint, flushInterval, maxBatchSize, trackPageviews, consent, and debug, with defaults, types, and constraints. - [Debugging](https://docs.wendung.app/configuration/debugging.md): Enable verbose logging, interpret [Wendung - Warning] messages, and troubleshoot the most common SDK integration issues. - [Overview](https://docs.wendung.app/help/overview.md): Understand your project at a glance. The Funnels tab covers identities, events, and engagement; the Web tab covers your sites. - [Overview](https://docs.wendung.app/help/dashboards.md): Compose funnel charts, metrics, and lists into custom views, and share them with a public link. - [Funnels](https://docs.wendung.app/help/funnels.md): Create funnels from your tracked steps and keep an eye on conversion health across all of them. - [Funnel details](https://docs.wendung.app/help/funnel-details.md): Read the funnel flow, find your biggest drop-off, compare segments, and save the views you come back to. - [Users](https://docs.wendung.app/help/users.md): Browse every identity in your project and drill into an individual user's sessions and steps. - [Sites](https://docs.wendung.app/help/sites.md): Register the hostnames you want web analytics for and see their traffic at a glance. - [Site details](https://docs.wendung.app/help/site-details.md): Read a site's traffic: visitors, sessions, pages, sources, locations, and devices, with filters and comparison. - [Site settings](https://docs.wendung.app/help/site-settings.md): Choose the hostname, collapse dynamic paths with normalization rules, and decide which query parameters to keep. - [Events](https://docs.wendung.app/help/events.md): Inspect every request your SDK sends and debug why events were delivered, rejected, or quarantined. - [Project settings](https://docs.wendung.app/help/settings.md): Manage your project details, control which domains can send events, and handle API keys. - [Plans and limits](https://docs.wendung.app/help/plans.md): What each plan includes, how the free plan and trial work, and how event and pageview quotas, rate limits, data retention, and MCP queries behave when you hit a limit. - [Billing](https://docs.wendung.app/help/billing.md): Find your current subscription, manage your plan and payment details, cancel renewal, and download invoices. - [Wendung.init(): Initialize and configure the Wendung SDK](https://docs.wendung.app/api-reference/init.md): Configure and start the Wendung SDK. Call once from client-side app startup before using any other method. - [Wendung.setConsent(): Apply the visitor's analytics choice](https://docs.wendung.app/api-reference/set-consent.md): Start collection when analytics is allowed, or stop it, drop queued events, and remove the SDK's browser identifiers when it is denied. - [Wendung.getConsent(): Read the current analytics consent state](https://docs.wendung.app/api-reference/get-consent.md): Return the consent state set by init() or the latest setConsent() call, for settings toggles and debugging. - [Wendung.identify(): Associate all events with a user](https://docs.wendung.app/api-reference/identify.md): Associate a user ID and optional traits with all subsequent events. Call after login or whenever the current user's identity becomes known to your app. - [Wendung.step(): Record and queue a named user event](https://docs.wendung.app/api-reference/step.md): Queue a named event with optional properties. Events are batched and sent automatically on a timer, on batch fill, or when the page is hidden or unloaded. - [Wendung.page(): Record a pageview for the current URL](https://docs.wendung.app/api-reference/page.md): Queue a pageview for the current page. Only needed when trackPageviews is off or your router bypasses the history API. - [Wendung.flush(): Send queued events now](https://docs.wendung.app/api-reference/flush.md): Send one batch of queued events via fetch. Returns a Promise that resolves when the request settles. Server errors re-queue; client errors are dropped. - [Wendung.reset(): Clear user identity and session state](https://docs.wendung.app/api-reference/reset.md): Clear the stored user ID, traits, and pending queue, then generate a new session ID. Call on logout to prevent events from being attributed to the wrong user. - [Wendung.sendBeacon(): Drain the queue with keepalive requests](https://docs.wendung.app/api-reference/send-beacon.md): Drain the entire event queue as parallel fetch requests with keepalive, so delivery can continue while the page unloads. - [Wendung.destroy(): Fully shut down the SDK instance](https://docs.wendung.app/api-reference/destroy.md): Stop the flush timer, remove lifecycle listeners, and attempt a final flush. After destroy(), call init() again before using any other SDK method. - [TypeScript types exported by the Wendung SDK reference](https://docs.wendung.app/api-reference/types.md): Complete reference for every exported TypeScript type in the Wendung SDK, including configuration, identity, event, and ingest payload shapes. This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.