Get a weekly Vercel Web Analytics report with top pages and referrers

Every Monday: visitors and page views from Vercel Web Analytics for last week against the week before, with the top pages and referrers that moved.

Runs
Mondays at 8:00
Uses
Vercel
Posts
Report card

From your apps to your board

How the skill works: your agent reads week's totals from Vercel; vercel team id or slug, vercel project from What you tell it, mondays at 8:00, and gives you report card and the report in the chat.

Reads

  • VercelWeek's totals
  • What you tell itVercel team ID or slug, Vercel project
reads
Your agentClaude Code, Codex, Cursor or GeminiMondays at 8:00
posts

You get

  • Report cardOn your board, updated in place every run
  • The report in the chatEvery run, with or without Briefkin

What you get

  • Visitors and page views last week, against the week before.
  • By day: the best and worst day.
  • Top pages with views and change.
  • Top referrers with visitors and change, new ones marked.
  • One line on what drove the change.

The card on the right is a sample. Yours shows your own numbers and updates in place every run.

What lands on your board

example.comVercel Web Analytics weekly report · Claude Code

Visitors up 18%, led by a Hacker News referral

8,420 visitors and 21,960 page views last week, up from 7,135 and 19,240. news.ycombinator.com sent 1,180 visitors to one post on Wednesday.

Visitors8,420+18% vs previous period, better
Page views21,960+14% vs previous period, better
PageViewsvs last week
/6,210+4%
/blog/[slug]5,890+61%
/pricing2,140+9%
/docs/[...path]1,980-6%
/changelog640+22%
google.com2,310 visitors
news.ycombinator.com1,180 visitors
github.com420 visitors
x.com260 visitors
linkedin.com140 visitors
Done
An example with made-up numbers. Your agent posts your real ones.

What it does

Vercel Web Analytics is the analytics many small teams already have because it came with the hosting, and the dashboard is fine for a glance. What it does not do is tell you on Monday what changed last week, which is the question a founder or a developer who launched something actually has.

The agent queries the Web Analytics API for the last full week and the one before, compares visitors and page views, and lists the pages and referrers that grew or dropped the most. A launch post that brought 2,000 visitors from one site shows up by name.

How it works

  1. 1Get the week's totals

    With the Vercel MCP server, call count_pageviews with projectId, since (last Monday 00:00) and until (Sunday 23:59); over REST, GET https://api.vercel.com/v1/query/web-analytics/visits/count. It returns pageviews and visitors. Repeat for the week before.

  2. 2Break it down by day

    aggregate_pageviews (or GET /v1/query/web-analytics/visits/aggregate) with by: ["day"] for the two weeks, to find the best and worst day and any spike.

  3. 3Find the top pages and referrers

    Run aggregate_pageviews with by: ["route"] and limit: 10, then with by: ["referrerHostname"], for both weeks. route rolls /blog/[slug] into one row; use requestPath when you want each post separately.

  4. 4

    4Compare and report

    Visitors and page views with the change in percent, then the top pages and referrers with their change. Call out any page or referrer that more than doubled, and any that fell by half.

  5. Post it to the board

    With BRIEFKIN_TOKEN set, the agent sends the result as one card that updates in place every run. Without it, you get the report in the chat.

Install and run it

Pick your agent, where the data comes from and how to schedule it; the commands below follow.

Agent
Data
Schedule
  1. Install the skill

    One command. It puts the SKILL.md in ~/.claude/skills and in ~/.agents/skills, which Codex, Cursor, Gemini CLI, Copilot CLI and OpenCode read too.

    shellcurl -fsSL https://briefkin.dev/skills/vercel-web-analytics-weekly-report/install | sh
  2. Run it

    Ask Claude Code:

    promptRun the vercel-web-analytics-weekly-report skill

    Or paste the prompt instead of installing:

    promptUsing the Vercel MCP server (count_pageviews and aggregate_pageviews) or the Web Analytics REST API (/v1/query/web-analytics/visits/count and /visits/aggregate), report on project <project> for last week, Monday to Sunday, against the week before. Give visitors and page views with the change in percent, the daily breakdown (by day) with the best and worst day, the top 10 routes by page views with their change, and the top 10 referrer hostnames by visitors with their change. Mark referrers that are new this week, and any page or referrer that more than doubled or fell by half. Production traffic only. End with one sentence on what drove the change.
  3. Put it on a schedule

    Mondays at 8:00, from cron on any machine where Claude Code is signed in:

    crontab0 8 * * 1 claude -p "Run the vercel-web-analytics-weekly-report skill"

    Add it with crontab -e. A laptop asleep at that time runs it when it wakes if you use launchd or Task Scheduler instead; GitHub Actions works for the API route.

  4. Send it to your board

    Connect Briefkin once with curl -fsSL https://briefkin.dev/install | sh and every run lands on your board as a report card. How setup works

View the SKILL.mdRaw file
SKILL.md---
name: vercel-web-analytics-weekly-report
description: "Every Monday: visitors and page views from Vercel Web Analytics for last week against the week before, with the top pages and referrers that moved. Use when the user asks for this, or when it runs on a schedule."
---

# Vercel Web Analytics weekly report

Every Monday: visitors and page views from Vercel Web Analytics for last week against the week before, with the top pages and referrers that moved.

Vercel Web Analytics is the analytics many small teams already have because it came with the hosting, and the dashboard is fine for a glance. What it does not do is tell you on Monday what changed last week, which is the question a founder or a developer who launched something actually has.

The agent queries the Web Analytics API for the last full week and the one before, compares visitors and page views, and lists the pages and referrers that grew or dropped the most. A launch post that brought 2,000 visitors from one site shows up by name.

## Two ways to get the data

Use the API or MCP route when you have an MCP server, a CLI or an API token for the app. Otherwise, if you can drive a browser the user is signed in to (Claude in Chrome, a Playwright or Chrome DevTools MCP server), use the browser route. Say which one you used.

## Route A: API or MCP server

### What you need

- Web Analytics enabled on the project, and a Vercel token for a member of the team in `VERCEL_TOKEN` with the team ID or slug.
- Or the Vercel MCP server or connector, signed in to that team.

If something is missing, say what and stop; do not invent numbers.

### Steps

1. **Get the week's totals** (Vercel): With the Vercel MCP server, call `count_pageviews` with `projectId`, `since` (last Monday 00:00) and `until` (Sunday 23:59); over REST, `GET https://api.vercel.com/v1/query/web-analytics/visits/count`. It returns `pageviews` and `visitors`. Repeat for the week before.
2. **Break it down by day** (Vercel): `aggregate_pageviews` (or `GET /v1/query/web-analytics/visits/aggregate`) with `by: ["day"]` for the two weeks, to find the best and worst day and any spike.
3. **Find the top pages and referrers** (Vercel): Run `aggregate_pageviews` with `by: ["route"]` and `limit: 10`, then with `by: ["referrerHostname"]`, for both weeks. `route` rolls `/blog/[slug]` into one row; use `requestPath` when you want each post separately.
4. **Compare and report**: Visitors and page views with the change in percent, then the top pages and referrers with their change. Call out any page or referrer that more than doubled, and any that fell by half.

## Route B: the browser

### What you need

- Signed in to Vercel as a member of the team that owns the project, on a project with Web Analytics enabled; Viewer role is enough.

If something is missing, say what and stop; do not invent numbers.

### Steps

Start at https://vercel.com/dashboard. The user is signed in already; never type passwords or codes, and ask if a sign-in page appears.

1. **Open the project's Analytics page**: From the dashboard pick the team and the project, then **Analytics** in the project sidebar. Leave the environment dropdown in the top right on **Production**.
2. **Set last week as the timeframe**: Open the timeframe dropdown in the top right, select the calendar icon and enter last Monday to last Sunday as a custom range. Read the **Visitors** and **Page Views** totals above the chart; the chart gives the best and worst day.
3. **Read the Route and Referrers panels**: In the panels below, switch the pages panel to **Route** so `/blog/[slug]` rolls into one row, and note the top 10 with their views; then read the **Referrers** panel's top 10 by visitors. Use the three-dot menu at the bottom of a panel and **Export as CSV** when you want more than the visible rows (up to 250).
4. **Repeat for the week before**: Change the custom range to the previous Monday to Sunday and read the same totals, routes and referrers, so each number has a comparison.
5. **Compare and report**: Visitors and page views with the change in percent, then routes and referrers with their change, new referrers marked, and anything that more than doubled or fell by half called out, with one line on what drove it.

Note: The dashboard shows one timeframe at a time, so the comparison means reading every panel twice; the numbers match the API, since both use the same aggregated data. Custom ranges are limited to your plan's reporting window, which is shorter on Hobby. Panels show the top rows and group the rest as Others; the CSV export has up to 250 rows.

## The report

- **Visitors** and **page views** last week, against the week before.
- **By day**: the best and worst day.
- **Top pages** with views and change.
- **Top referrers** with visitors and change, new ones marked.
- One line on what drove the change.

## Post it to Briefkin

When `BRIEFKIN_TOKEN` is set, or `~/.config/briefkin/env` exists (the installer from https://briefkin.dev/docs writes it), also send the result to the user's Briefkin board as one card. Keep the `item_key` the same on every run so the card updates in place, use a new `event_id` per run, and put today's real numbers in place of the example ones. If the request fails, say so once and carry on.

```bash
[ -n "${BRIEFKIN_TOKEN:-}" ] || . ~/.config/briefkin/env
curl -sS -X POST "${BRIEFKIN_URL:-https://briefkin.dev}/v1/events" \
  -H "authorization: Bearer $BRIEFKIN_TOKEN" \
  -H "content-type: application/json" \
  -d @- <<'JSON'
{
  "v": 1,
  "event_id": "vercel-web-analytics-weekly-report/<date of this run, e.g. 2026-10-16>",
  "item_key": "vercel-web-analytics-weekly-report",
  "project": "example.com",
  "source": "Vercel Web Analytics weekly report skill",
  "kind": "update",
  "title": "Visitors up 18%, led by a Hacker News referral",
  "summary": "**8,420 visitors** and **21,960 page views** last week, up from 7,135 and 19,240. news.ycombinator.com sent **1,180** visitors to one post on Wednesday.",
  "widget": [
    {
      "type": "Grid",
      "props": {
        "columns": 2
      },
      "children": [
        {
          "type": "Stat",
          "props": {
            "label": "Visitors",
            "value": 8420,
            "delta": 18
          }
        },
        {
          "type": "Stat",
          "props": {
            "label": "Page views",
            "value": 21960,
            "delta": 14.1
          }
        }
      ]
    },
    {
      "type": "Table",
      "props": {
        "columns": [
          "Page",
          "Views",
          "vs last week"
        ],
        "align": [
          "left",
          "right",
          "right"
        ],
        "rows": [
          [
            "/",
            "6,210",
            "+4%"
          ],
          [
            "/blog/[slug]",
            "5,890",
            "+61%"
          ],
          [
            "/pricing",
            "2,140",
            "+9%"
          ],
          [
            "/docs/[...path]",
            "1,980",
            "-6%"
          ],
          [
            "/changelog",
            "640",
            "+22%"
          ]
        ]
      }
    },
    {
      "type": "Bars",
      "props": {
        "unit": "visitors",
        "items": [
          {
            "label": "google.com",
            "value": 2310
          },
          {
            "label": "news.ycombinator.com",
            "value": 1180
          },
          {
            "label": "github.com",
            "value": 420
          },
          {
            "label": "x.com",
            "value": 260
          },
          {
            "label": "linkedin.com",
            "value": 140
          }
        ]
      }
    }
  ]
}
JSON
```

Widgets come from the Briefkin catalog (https://briefkin.dev/v1/catalog). Without a token, just give the user the report.

## Run it on a schedule

Suggested: Mondays at 8:00 (`0 8 * * 1`). From cron, with the agent signed in on that machine:

```bash
0 8 * * 1 claude -p "Run the vercel-web-analytics-weekly-report skill"
# Codex: codex exec, Gemini CLI: gemini -p, Copilot CLI: copilot -p, OpenCode: opencode run
```

Or use the agent's own scheduler (Claude Code routines, Codex automations, Claude or ChatGPT scheduled tasks): https://briefkin.dev/skills/vercel-web-analytics-weekly-report#schedule

Source: https://briefkin.dev/skills/vercel-web-analytics-weekly-report

What your agent needs

  • Web Analytics enabled on the project, and a Vercel token for a member of the team in VERCEL_TOKEN with the team ID or slug.

  • Or the Vercel MCP server or connector, signed in to that team.

Connecting Vercel

  1. Vercel MCP, Vercel's official remote server at https://mcp.vercel.com, signed in with OAuth. It lists projects and deployments, reads build and runtime logs, and searches Vercel's docs.
  2. The vercel CLI. vercel ls <project> lists recent deployments, vercel inspect <deployment-url> --logs prints the build log, and vercel logs <deployment-url> shows runtime logs. Pass --token $VERCEL_TOKEN and --scope <team> in scheduled runs.
  3. REST API with an access token created under Account Settings > Tokens and scoped to the team, stored in VERCEL_TOKEN, with VERCEL_TEAM_ID sent as teamId.

Vercel tokens can be limited to one team and given an expiry but can't be made read-only, so use a short-lived token for reports and keep deploy and env var tasks out of the same skill.

Questions

Why do my numbers differ from Google Analytics?

Vercel Web Analytics counts visitors without cookies, using a daily hash, so a person who visits on Monday and Thursday counts on both days. Ad blockers and consent banners affect each tool differently too. Compare trends within one tool rather than totals across tools.

How far back can it compare?

The aggregate endpoints answer within your plan's reporting window, which is longer on paid plans. A week-over-week comparison fits every plan; month-over-month or year-over-year depends on how far back your plan keeps data.

Do I need Briefkin to use the Vercel Web Analytics weekly report skill?

No. The skill runs with your own agent and gives you the report in the chat. With a Briefkin token set, each run also posts it to your board as a report card, so you can glance at it instead of asking again.

Which agents can run it?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot CLI, OpenCode, Windsurf and Amp all read SKILL.md files. The install command puts it in ~/.claude/skills and ~/.agents/skills, where they look. ChatGPT, the Claude app and Grok take the prompt instead. Pick your agent under "Install and run it" and the commands change to match.

Can it work without an API or MCP server, from my browser?

Yes. Switch the data source to "Your browser" and the steps change to the Vercel pages themselves: the agent opens vercel.com/dashboard in a browser you are signed in to and reads the numbers off the page. Claude Code, Codex, Cursor, Claude app and ChatGPT can drive a browser out of the box; Gemini CLI, Copilot CLI and OpenCode need a Playwright or Chrome DevTools MCP server first. It is slower than the API and needs you signed in, so it suits a report you run by hand or from a scheduler on your own computer.

Read this report on your board, not in a chat log

Skills are free to use with any agent. Briefkin is where their results land: one board for every report, number and question your agents send, with a ping when something needs you.

Free during the open beta. No card.