> This page is for Browser API.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developers.webflow.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developers.webflow.com/_mcp/server.

# Get user tracking choice

> Retrieve the user's tracking preference for Webflow Analyze and Optimize.

## `wf.getUserTrackingChoice()`

Retrieves the user's current tracking preference. Returns one of three possible states: `allow`, `deny`, or `none`.

### Syntax

```typescript
wf.getUserTrackingChoice(): 'allow' | 'deny' | 'none'
```

### Returns

The user's current tracking choice:

* `'allow'` User has opted in to tracking.
* `'deny'` User has opted out of tracking.
* `'none'` User hasn't made a choice.

### Example

```typescript
// Ensure Browser APIs are ready before calling
wf.ready(() => {
  // Retrieve the user's tracking choice
  const choice = wf.getUserTrackingChoice();
  console.log(choice); // 'allow', 'deny', or 'none'
});
```