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

# Events and views

> Track extension features and views.

Call `analytics.track()` when someone uses a feature:

```typescript theme={null}
await analytics.track("export_completed", { format: "csv", count: 12 });
```

Properties are optional. They can contain up to 25 string or finite number values. Keys must start with a letter, contain only letters, digits, or underscores, and be at most 64 characters. String values can contain up to 256 Unicode characters; the full properties object is limited to 8 KiB when encoded as JSON.

Call `analytics.view()` when someone opens an extension view:

```typescript theme={null}
await analytics.view();
await analytics.view("export_history");
```

Without a name, the SDK will try to recognize common surfaces such as a popup or side panel. If it cannot, the name is `unknown`. Pass a name to identify a custom view.

Install and update events are recorded automatically. Uninstall reporting is optional. Avoid event names beginning with `_`: crxbase uses that prefix for platform events, so using it may affect reports.

The SDK also records the context where an extension event originated, such as the popup or background. This context is separate from a custom view name and an acquisition source.


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