<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Henrik Holen</title>
    <description>The latest articles on DEV Community by Henrik Holen (@hholen).</description>
    <link>https://dev.to/hholen</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3939627%2F94606cc9-1e04-4bdd-9f36-8afe574a9c61.png</url>
      <title>DEV Community: Henrik Holen</title>
      <link>https://dev.to/hholen</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/hholen"/>
    <language>en</language>
    <item>
      <title>I built web analytics with no dashboard, only an MCP</title>
      <dc:creator>Henrik Holen</dc:creator>
      <pubDate>Tue, 19 May 2026 08:22:46 +0000</pubDate>
      <link>https://dev.to/hholen/i-built-web-analytics-with-no-dashboard-only-an-mcp-40ef</link>
      <guid>https://dev.to/hholen/i-built-web-analytics-with-no-dashboard-only-an-mcp-40ef</guid>
      <description>&lt;p&gt;A while back I built an analytics tool. It had two ideas: it was cheap, and it sent you an AI summary every Sunday. Turns out cheap made no difference, but the few people who used it liked the AI summary a lot more than the dashboard.&lt;/p&gt;

&lt;p&gt;So I threw away the dashboard and rebuilt the whole thing as an MCP server. 42 tools that AI coding agents (Claude Code, Cursor, Codex) can call directly. Traffic, sources, funnels, session paths, events, performance. The agent asks questions, the tools return compact JSON.&lt;/p&gt;

&lt;p&gt;The idea is simple: your coding agent already has your codebase, your database, and your git history. Adding traffic data gives it one more layer of context. The analytics isn't something you go and check, it's context the agent uses while it works.&lt;/p&gt;

&lt;h2&gt;
  
  
  The basic implementation
&lt;/h2&gt;

&lt;p&gt;You're building a new landing page and your agent already knows your traffic patterns. It can tell you that &lt;code&gt;/blog/why-acme&lt;/code&gt; converts at 12% while &lt;code&gt;/docs&lt;/code&gt; gets 189 views and zero signups. You don't ask for a report, the agent just has that context available when it's making suggestions.&lt;/p&gt;

&lt;p&gt;Or you deploy a change and ask "did anything break?" The agent calls &lt;code&gt;get_snapshot&lt;/code&gt;, compares to yesterday, and tells you bounce rate spiked 15% on the pricing page. That's a 30-second conversation instead of opening a dashboard, finding the right view, selecting the right date range.&lt;/p&gt;

&lt;h2&gt;
  
  
  The CLAUDE.md experiment
&lt;/h2&gt;

&lt;p&gt;The part I found most interesting was getting the agent to use analytics unprompted. I tested three approaches:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;No instructions&lt;/strong&gt; — agent never touched analytics&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Full paragraph&lt;/strong&gt; explaining what Lodd is and when to use it — agent added tracking to new features&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Three lines&lt;/strong&gt; near the top of CLAUDE.md pointing to a skill file — agent added tracking to new features, same as the verbose version&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Position mattered more than length. The same three lines buried at line 172 didn't work. At line 17 they did. The agent reads the whole file, but early instructions seem to carry more weight.&lt;/p&gt;

&lt;p&gt;That's three lines of config and your agent starts adding analytics tracking to every new page and feature without being asked.&lt;/p&gt;

&lt;h2&gt;
  
  
  Some details
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Responses use shortened keys (&lt;code&gt;v&lt;/code&gt; not &lt;code&gt;visitors&lt;/code&gt;) to save context window tokens. A full snapshot is about 55 tokens.&lt;/li&gt;
&lt;li&gt;49 REST API endpoints for automation workflows (scheduled reports, Slack alerts, GitHub issue creation when traffic drops).&lt;/li&gt;
&lt;li&gt;No cookies, country-only geolocation, hashed IPs. GDPR compliant without consent banners.&lt;/li&gt;
&lt;li&gt;2KB tracking script with SPA support built in.&lt;/li&gt;
&lt;li&gt;Free up to 2,500 events/month, €9.99/month for 100K.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Limitations
&lt;/h2&gt;

&lt;p&gt;No dashboard. If you need charts for a board meeting, this isn't the right tool. It's newer and less battle-tested than Plausible or Fathom. No self-hosting option.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;p&gt;Install the MCP server:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx &lt;span class="nt"&gt;-y&lt;/span&gt; @lodd/mcp-server
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or point your coding agent at &lt;a href="https://lodd.dev/llms.txt" rel="noopener noreferrer"&gt;lodd.dev/llms.txt&lt;/a&gt; and let it figure out the setup.&lt;/p&gt;

&lt;p&gt;The REST API docs are at &lt;a href="https://lodd.dev/api" rel="noopener noreferrer"&gt;lodd.dev/api&lt;/a&gt; if you want to build automations. I wrote a &lt;a href="https://lodd.dev/blog/trigger-dev-analytics" rel="noopener noreferrer"&gt;tutorial on automating monthly reports with Trigger.dev&lt;/a&gt; if that's your thing.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://lodd.dev" rel="noopener noreferrer"&gt;lodd.dev&lt;/a&gt;&lt;/p&gt;

</description>
      <category>mcp</category>
      <category>analytics</category>
      <category>productivity</category>
      <category>startup</category>
    </item>
  </channel>
</rss>
