Skip to content

vercel/analytics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

9a90468 · Feb 10, 2025

History

64 Commits
Feb 16, 2024
Oct 27, 2022
Feb 10, 2025
Feb 10, 2025
Feb 10, 2025
Feb 16, 2024
Nov 7, 2024
Oct 24, 2022
Oct 24, 2022
Oct 27, 2022
Oct 6, 2023
Feb 10, 2025
Dec 6, 2022
Feb 22, 2023

Repository files navigation

Analytics

Vercel Web Analytics
Privacy-friendly, real-time traffic insights

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.

  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.
  4. Deploy your app to Vercel and see data flowing in.

Documentation

Find more details about this package in our documentation.