Analytics for VS Code

Live web analytics, answered from inside VS Code.

Connect VS Code to your live web analytics through Copilot's agent. Ask about funnel conversion, traffic sources, or revenue right next to the code that ships them.

What VS Code can answer

  • “Show me the funnel for users who hit the file I just edited.”

    Calls pages.engagement on the path that matches the file, then funnel.create across whatever downstream events you've declared. Returns conversion rate per step.

  • “Which referrers drove yesterday's traffic to /docs?”

    Runs traffic.breakdown by referrer filtered to /docs. Returns the top 20 with pageview counts.

  • “Is the change I'm about to make likely to affect a high-traffic page?”

    Calls pages.engagement on the route mapping to the file. Returns the page's recent traffic share so you know whether the change is high or low impact before shipping.

  • “What custom events have I declared but never fired?”

    Reads event-schema.yaml, calls events.observed_schema for the last 30 days, returns the dormant events. Useful before deleting stale declarations.

Connect in three steps

  1. 1

    Sign in to your Clamp dashboard

    Free tier, no credit card. Create a project if you haven't yet.

  2. 2

    Click "Install in VS Code" on the Connections page

    One click adds the MCP connection to your VS Code settings. No config files to edit by hand.

  3. 3

    Approve the connection in VS Code

    Confirm once. Copilot's agent can now read your analytics — scoped to the project you picked.

Analytics where the code lives

The VS Code surface is the editor itself. Asking "what's the conversion impact of the route I'm editing right now?" lands as a Copilot agent query that returns the answer in the side panel. You don't lose the cursor position, the file context, or the conversation. The dashboard stays available for visual exploration — but the everyday questions get answered without leaving the editor.

FAQ

Does this work with GitHub Copilot or only the Copilot subscription?

It works wherever Copilot's MCP support is enabled — currently the agent mode and chat. Check the Copilot extension version if the connection doesn't appear.

Does this cost extra?

Not on Clamp's side — the MCP is included on every tier including Free. Copilot's own pricing applies separately.

Can I use this alongside another analytics tool?

Yes. Install @clamp-sh/analytics alongside whatever you have — nothing breaks. Useful if you want to dual-run while evaluating.

What about PII?

Clamp rejects email-shaped strings server-side, IP addresses are discarded after country lookup, and the MCP returns aggregated metrics by default.

Use a different agent?

Working with another MCP-compliant client? The Clamp MCP works with anything that speaks the protocol — see setup docs.

Try this in VS Code

Free tier covers 100K events/month. No credit card.