> ## Documentation Index
> Fetch the complete documentation index at: https://upstash-vector.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Analytics

You can enable analytics to get a better understanding of how your ratelimiting
is performing. This is done by setting `analytics: true` in the options.

All data is stored in the same Redis database and writing analytics uses 1
command per `.limit` invocation.

```ts
const ratelimit = new Ratelimit({
  redis: Redis.fromEnv(),
  limiter: Ratelimit.tokenBucket(5, "10 s", 10),
  analytics: true, // <- Enable analytics
});
```

Go to the [Ratelimit Dashboard](https://console.upstash.com/ratelimit) and
select the database you are using.

If you are using a custom prefix, you need to use the same in the dashboard's
top right corner.

<Frame>
  <img src="https://mintlify.s3-us-west-1.amazonaws.com/upstash-vector/oss/sdks/ts/ratelimit/img/sdk/ratelimit/dashboard.png" />
</Frame>
