# @vercel/analytics

> Gain real-time traffic insights with Vercel Web Analytics

Latest version **2.0.1** (published 2026-03-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install @vercel/analytics
pnpm add @vercel/analytics
yarn add @vercel/analytics
bun add @vercel/analytics
```

## Health

**Score 65/100 (B)** — status: stable.

Positive: has types; esm support; no vulnerabilities; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 2.0.1 |
| Published | 2026-03-12 |
| First published | 2022-10-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 485.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 515 |
| Maintainers | vercel-release-bot, zeit-bot |
| Keywords | analytics, vercel |

## Links

- npm: https://www.npmjs.com/package/@vercel/analytics
- Repository: https://github.com/vercel/analytics
- Homepage: https://github.com/vercel/analytics#readme
- Issues: https://github.com/vercel/analytics/issues
- npm.io page: https://npm.io/package/@vercel/analytics

## Alternatives

- [jsforce](https://npm.io/package/jsforce.md) — 851.2K weekly downloads
- [react-native-qrcode-svg](https://npm.io/package/react-native-qrcode-svg.md) — 693.5K weekly downloads
- [@salesforce/plugin-data](https://npm.io/package/@salesforce/plugin-data.md) — 394.9K weekly downloads
- [@backstage/plugin-search-common](https://npm.io/package/@backstage/plugin-search-common.md) — 308.5K weekly downloads
- [@chain-registry/types](https://npm.io/package/@chain-registry/types.md) — 38.4K weekly downloads

## Recent versions

- 2.0.1 (latest) — 2026-03-12
- 2.1.0-canary.4 (beta) — 2026-09-22
- 1.0.2 (canary) — 2023-08-10
- 2.3.0-canary — 2026-08-26
- 2.2.0-canary — 2026-07-06
- 2.1.0-canary — 2026-06-19
- 2.0.2-canary — 2026-04-01
- 2.0.0 — 2026-03-10
- 2.0.0-canary.1 — 2026-02-17
- 1.6.1 — 2025-12-02
- 1.6.0 — 2025-12-01
- 1.5.0 — 2025-02-10
- 1.5.0-canary.3 — 2024-11-25
- 1.5.0-canary.2 — 2024-11-21
- 1.4.1 — 2024-11-19
- … 54 more at https://npm.io/package/@vercel/analytics/versions

## README

![Analytics](https://github.com/vercel/analytics/blob/main/.github/banner.png)

<div align="center"><strong>Vercel Web Analytics</strong></div>
<div align="center">Privacy-friendly, real-time traffic insights</div>
<br />
<div align="center">
<a href="https://vercel.com/analytics">Website</a>
<span> · </span>
<a href="https://vercel.com/docs/concepts/analytics/package">Documentation</a>
<span> · </span>
<a href="https://twitter.com/vercel">Twitter</a>
</div>

## Overview

`@vercel/analytics` allows you to track page views and custom events in your Next.js app or any other website that is deployed to Vercel.

All page views are automatically tracked in your app.

This package does **not** track data in development mode.

## Quickstart

1. Enable Vercel Web Analytics for a project in the [Vercel Dashboard](https://vercel.com/dashboard).
2. Add the `@vercel/analytics` package to your project
3. Inject the Analytics script to your app

   - If you are using **Next.js** or **React**, you can use the `<Analytics />` component to inject the script into your app.
   - To add the tracking script for other frameworks, use the `inject` function.
   - If you want to use Vercel Web Analytics on a static site without npm, follow the instructions in the [documentation](https://vercel.com/docs/analytics/quickstart).

4. Deploy your app to Vercel and see data flowing in.

## Documentation

Find more details about this package in our [documentation](https://vercel.com/docs/analytics/quickstart).

---
_Source: https://npm.io/package/@vercel/analytics · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
