Web Analytics
Count visitors, page views, and custom events with the unmodified @vercel/analytics package.
Web Analytics shows who visits your site and what they do: visitors, page
views, bounce rate, top pages and routes, referrers, UTM parameters, countries,
devices, browsers, operating systems, and custom events. It works with the
@vercel/analytics package as it is. You don't change your code or set an
endpoint.
Web Analytics doesn't use cookies. Easel counts a visitor with an anonymous hash of the project, IP address, and user agent, under a key that changes every day. The IP address isn't stored with your analytics, and the hash can't be matched across days or projects. Referrers are kept without their query string. Known crawlers and verified bots aren't counted.
Turn it on
Web Analytics is off until a workspace owner or admin turns it on for a project.
-
Open the project and select Analytics.
-
Select Enable.
-
Install the package in your app:
-
Add the component. For the Next.js App Router, add it to
app/layout.tsx:Other frameworks use the same package:
@vercel/analytics/react,@vercel/analytics/sveltekit,@vercel/analytics/nuxt, orinject()from@vercel/analytics. -
Deploy, then visit your site. Data shows up on the Analytics page within a minute.
Every build points the package at a path unique to your project instead of
/_vercel/insights, so ad blockers that block Vercel Analytics don't drop your
visitors.
To turn it off, open Settings > Analytics. Easel stops collecting, and the data you already collected stays.
Custom events
Custom events track actions that aren't page views, such as a sign-up or a
purchase. Send them with track():
From server code, import track from @vercel/analytics/server and pass the
request, so the event is attributed to the visitor:
Event names and property values are limited to 255 characters. Properties must
be strings, numbers, booleans, or null; nested objects are dropped. On the
Analytics page, select an event to see the values of its properties.
Read the page
The Analytics page covers the environment and time range you pick at the top: production, preview, or both, over the last 24 hours or 7, 30, or 90 days.
| Section | Shows |
|---|---|
| Online | Visitors active in the last five minutes |
| Visitors, Page Views, Bounce Rate | Totals with the change from the previous period of the same length, and a chart of the selected one |
| Pages, Routes, Hostnames | Where visitors went. Routes group dynamic pages, such as /blog/[slug]. |
| Referrers, UTM Parameters | Where visitors came from |
| Countries, Devices, Browsers, Operating Systems | Who visitors are, as a share of visitors |
| Events | Custom events by visitors and total count |
Select any row to filter the whole page by it. Filters stay in the page URL, so you can share a filtered view. A referrer or UTM filter shows the visitors who arrived that way, with every page they viewed after landing.
Bounce rate is the share of visitors who viewed one page.
Pricing
An event is a page view or a custom event.
| Plan | Included | After that |
|---|---|---|
| Hobby | 50,000 events a month | Collection pauses until the next cycle. Your sites keep running. |
| Pro | None | $0.03 per 1,000 events |
Your project's firewall rules and rate limits apply to Web Analytics requests, so you can block or limit traffic that would add events you don't want.
See Limits for retention.
Next steps
- Measure performance with Speed Insights.
- Debug individual requests in Logs.