How to check your website traffic from Claude Code
I check my traffic from the terminal. Not because it's clever, but because that's where I already am. Claude Code supports MCP servers, so adding Lodd gives your agent 42 tools for querying traffic, sources, funnels, events, and performance data. Setup takes about two minutes, and after that your agent has traffic context for every conversation.
If you spend most of your day in Claude Code, switching to a browser dashboard to check traffic is a context break. The data you need is usually simple: "how many visitors today," "is traffic up or down after that deploy," "which pages have the highest bounce rate." These are one-line questions, and your agent can answer them inline while it's already helping you with something else.
There's a second thing people mean by "checking Claude traffic": not using Claude to check your numbers, but seeing how much traffic Claude itself sends you. That's AI referral traffic, a different question with a different answer, and I covered tracking AI traffic from ChatGPT, Claude, and Perplexity separately, including the crawlers your JavaScript tracker can't see.
What does checking traffic from Claude Code look like?
Once the MCP server is connected, you ask your agent about traffic in natural language and it calls the appropriate tool. A typical exchange looks like this: you say "how's traffic today" and the agent calls get_snapshot, which returns today's visitors, pageviews, bounce rate, and average session duration compared to yesterday, all as compact JSON that costs about 55 tokens of context. The agent reads the data and tells you what changed.
Here are some real queries that work immediately after setup:
- "What are my top 10 pages this week?" — calls
get_pages - "Where is my traffic coming from?" — calls
get_traffic_sources - "Show me a 30-day trend of daily visitors" — calls
get_timeseries - "What's the conversion funnel from /pricing to /signup to the signup_complete event?" — calls
get_funnel - "How fast is my site loading on mobile?" — calls
get_performancewith a device filter - "Did the deploy on Monday affect anything?" — calls
get_timeseriesand checks annotations
Every query accepts filters for country, browser, OS, device type, UTM source, and referrer. Periods range from "today" to custom date spans up to 365 days. The agent figures out which tool and which parameters to use based on what you ask.
How do you set up Lodd in Claude Code?
The fastest way is a single prompt. Tell Claude Code: "Add lodd.dev analytics to this project." The agent reads the setup instructions from lodd.dev/llms.txt, writes the MCP config, handles email authentication with a 6-digit code, creates a site, and embeds the 2KB tracking script in your HTML. You'll need to restart Claude Code once during setup so the MCP server loads.
If you prefer to do it manually, add this to your project's .mcp.json:
{
"mcpServers": {
"lodd": {
"command": "npx",
"args": ["-y", "@lodd/mcp-server"],
"env": {
"LODD_API_KEY": "your_api_key"
}
}
}
}Get an API key by signing up at lodd.dev and creating one from the dashboard, or let the agent handle it through the authenticate and verify_code tools. Once the key is in your config, restart Claude Code and all 42 tools become available.
For global access across all projects, put the config in ~/.claude/.mcp.json instead.
How can an agent use traffic data while coding?
Your agent already has your codebase, your terminal, and whatever else you've connected. Adding traffic context means it can factor in real usage data when it's already helping you with something else. A few concrete examples of how this plays out:
Debugging a deploy. You pushed a change and want to know if it broke anything. Instead of opening a dashboard, you tell your agent "check if traffic or bounce rate changed after my last deploy." It pulls the timeseries, checks for anomalies around the deploy timestamp, and tells you whether anything looks off, all while it's still in your codebase context and can inspect the code it just deployed. If the drop turns out to be search-side rather than something you shipped, adding Google Search Console alongside Lodd lets the agent check rankings and on-site behaviour in the same turn.
Prioritising fixes. Your agent can check which pages get the most traffic and the highest bounce rates, then cross-reference that with the files in your repo. "Which of my high-traffic pages have the worst bounce rate, and show me the relevant source files" is a single conversation that spans analytics and code.
Verifying a marketing change. You changed a CTA, updated copy, or restructured a landing page. Ask your agent to compare this week's conversion funnel to last week's. It calls get_funnel twice with different date ranges and tells you whether the numbers moved.
Morning check. I start most sessions with "anything unusual in traffic?" The agent calls get_snapshot, compares today to yesterday, and flags anything that's significantly different. Takes about three seconds.
What tools are available in Claude Code?
All 42 MCP tools work in Claude Code. They break down into these categories:
| Category | Tools | What they cover |
|---|---|---|
| Analytics | 5 | Snapshots, time series, funnels, realtime, full analytics |
| Breakdowns | 6 | Pages, traffic sources, countries, tech, entry/exit, bots |
| Performance | 1 | Load time avg/median/p95 by page, device, country, browser |
| Conversions | 2 | Pages and sources that drive specific events |
| Custom events | 3 | Event counts, individual records, time series per event |
| Actor analytics | 3 | Active users, per-user timelines, cohort retention |
| Links & annotations | 5 | Trackable links with click tracking, deploy notes |
| Management | 9 | Sites, API keys, team sharing, usage |
| Auth | 3 | Authenticate, verify, create account |
Responses are compact JSON with shortened keys (e.g. page_views becomes views, unique_visitors becomes visitors). This is deliberate: a typical analytics response costs around 55 tokens, leaving your agent's context window free for the code and conversation that matter.
What does it cost?
Free up to 2,500 events per month (pageviews and custom events combined, across all your sites). That covers most side projects and early-stage products. If you need more, the paid plan is €9.99/month for 100,000 events. All 42 tools are available on both tiers, no feature gating. There's a hard stop at the event limit, not a surprise invoice.
Are there limitations?
Lodd is read-only analytics. It does not trigger A/B tests, manage feature flags, or deploy code. The design is intentional: coding agents already have those capabilities through other tools. Lodd provides the traffic signal, and your agent decides what to do with it.
There is no dashboard. The data is structured JSON served to agents, not rendered as visualisations. In practice, anyone who needs to know "how's traffic" can ask Claude Desktop or claude.ai and get a plain-English answer, which for most people is clearer than navigating a dashboard. The assumption that stakeholders need charts is worth questioning when an agent can just explain the data.
Privacy-wise, Lodd uses no cookies, stores country-level geo only, and hashes all IPs with a daily-rotating salt that is deleted after 24 hours. No consent banners needed under GDPR.