Your Vercel analytics,in your inbox.

A small, self-hosted app that emails pageviews, visitors, and top routes from all your projects. It runs on a schedule and compares each report with the previous period.

  • Open source
  • Runs in your accounts
  • No database
Setup guide

Deploy your own digest.

Fork the repository, connect Vercel and Resend, then test your first email. The guide below covers every required setting.

!
Use Vercel Pro for the six-hour schedule.

The included hourly cron checks REPORT_INTERVAL_HOURSbefore sending; it defaults to every six hours. Vercel Hobby limits cron jobs to about one run per day, so use a daily cron and a 24-hour interval on Hobby.

01

Create your project

Fork the repo and import it into Vercel.

1

Fork the repository

Fork the repo, then import your fork into Vercel. Keep Next.js as the framework preset.

2

Create a Vercel access token

In Vercel Account Settings, create a token for the team that owns the projects. Set an expiration and save it asVERCEL_TOKEN. The REST API requires this access token; OIDC cannot authenticate these requests.

3

Enable Web Analytics

In each project you want included, open its Analytics tab and enable Web Analytics. The digest skips projects without it.

02

Connect Resend and Blob

Resend is required. Blob adds a link to the full HTML report.

4

Set up Resend

Create a Resend API key. Verify a sending domain (or a subdomain such as reports.yourdomain.com) with the DNS records Resend provides. YourREPORT_FROM address must use that verified domain.

5

Connect a public Blob store (optional)

Blob adds a hosted HTML report link to each email. To enable it, open Storage in your Vercel project and create or connect a Blob store. Choose Public so recipients can open the report without signing in. You cannot change the access mode after creating the store.

Vercel uses OIDC for Blob uploads. Connecting the store adds BLOB_STORE_ID. Vercel supplies VERCEL_OIDC_TOKEN on deployments. Enable OIDC federation in Project Settings / Security.
03

Configure the environment

Store the app's configuration in Vercel.

6

Generate the cron secret

Create a strong random value. The endpoint fails closed when this is absent.

TERMINAL
$ openssl rand -base64 32
7

Add production environment variables

Open Project / Settings / Environment Variables. Target Production and mark secrets as Sensitive.

VariableStatusWhat it does
VERCEL_TOKENRequiredA Vercel access token scoped to the team that owns the projects. Read access is sufficient.
VERCEL_TEAM_IDIf using a teamThe team_... id from Team Settings. Omit this for personal-account projects.
RESEND_API_KEYRequiredAn API key from Resend for email delivery.
REPORT_FROMRequiredA sender on your verified domain, such as Analytics <reports@yourdomain.com>.
REPORT_TORequiredOne recipient, or multiple comma-separated email addresses.
CRON_SECRETRequiredThe Bearer token that protects scheduled and manual runs.
EXCLUDED_PROJECTSOptionalComma-separated project names or ids to exclude. Matching ignores case.
REPORT_INTERVAL_HOURSOptionalDigest cadence and comparison-window size in whole hours (1–24). Defaults to 6.
BLOB_STORE_IDIf using BlobVercel adds this when you connect a Blob store and supplies the OIDC token at runtime.
04

Deploy and verify

Redeploy, then call the report endpoint once.

8

Redeploy to Production

Vercel reads environment variables and Blob settings at deployment time. Redeploy after connecting storage or changing the configuration.

9

Trigger a test digest

Call the production endpoint with the same secret you saved in Vercel.

TERMINAL
$ curl -H "Authorization: Bearer $CRON_SECRET"
  https://<your-production-url>/api/report
✓ {"ok":true,"projects":3,"incompleteProjects":0,"reportUrl":"https://..."}
✓

Email arrivedResend accepted and delivered the digest.

✓

Report opensThe public Blob URL returns the full HTML report.

✓

No incomplete dataincompleteProjects is zero.

Troubleshooting the first run +

reportUrl: nullConfirm the Blob store is connected to Production, OIDC is enabled, and you redeployed afterward.

incompleteProjects > 0One or more analytics requests failed. The digest omits projects that lack Web Analytics.

domain is not verifiedFinish the DKIM, SPF/return-path, and DMARC setup in Resend before sending.

LOCAL DEVELOPMENT

Run vercel link, then vercel env pull. Don't hand-edit env files. Local OIDC is development-scoped. Use the deployed endpoint when testing Blob uploads.

GitHub

Want to inspect the code first?