1. @vercel/analytics
Gain real-time traffic insights with Vercel Web Analytics
@vercel/analytics
Package: @vercel/analytics
Created by: vercel
Last modified: Tue, 20 Feb 2024 14:00:40 GMT
Version: 1.2.2
License: MPL-2.0
Downloads: 1,773,995
Repository: https://github.com/vercel/analytics

Install

npm install @vercel/analytics
yarn add @vercel/analytics

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.

RELATED POST

10 Must-Know Windows Shortcuts That Will Save You Time

10 Must-Know Windows Shortcuts That Will Save You Time

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Navigating AWS Networking: Essential Hacks for Smooth Operation

Navigating AWS Networking: Essential Hacks for Smooth Operation

Achieving Stunning Visuals with Unity's Global Illumination

Achieving Stunning Visuals with Unity's Global Illumination

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code