> ## 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.

# Wendung.step(): Record and queue a named user event

> 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.

Call `Wendung.step()` anywhere in your application to record a named event. The event is queued and flushed automatically: on the next timer tick, when the queue reaches the effective batch size, or when the page hides or unloads. Each event gets a unique `id` (`crypto.randomUUID()`), an ISO 8601 `timestamp` taken at call time, and a snapshot of the current session ID, [identity](/api-reference/identify), and page context.

Throws if called before [`init()`](/api-reference/init).

```typescript theme={null}
Wendung.step(name: string, properties?: Record<string, unknown>): void
```

## Parameters

<ParamField body="name" type="string" required>
  The event name, 1–100 characters. Use a consistent convention, for example `snake_case` pairs like `page_view` or `checkout_completed`. If the name is empty or too long, the call is ignored and a `[Wendung - Warning]` is logged; nothing is thrown.
</ParamField>

<ParamField body="properties" type="Record<string, unknown>">
  Optional metadata, sent as `events[].properties`. Must be a plain object with JSON-serializable values; it is deep-cloned at call time. If a non-plain value is passed (array, class instance, `Map`), the call is ignored and a warning is logged. To include array data, nest it under a key.
</ParamField>

## Returns

`void`

## Examples

### Simple event

```typescript theme={null}
Wendung.step('page_view')
```

### Event with properties

```typescript theme={null}
Wendung.step('export_clicked', {
  format: 'csv',
  rowCount: selectedRows.length,
})
```

<Tip>
  You do not need to call [`flush()`](/api-reference/flush) after `step()`. The SDK batches and sends automatically; manual flushing is only useful when you want a send attempt to settle before something like an external redirect.
</Tip>


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