# BetterMeter > BetterMeter is a privacy-first analytics platform for the AI era. It tracks websites, CLI tools, MCP servers, and APIs through a unified, cookie-free pipeline. BetterMeter is an alternative to Google Analytics built for developers who ship AI-powered products. ## What is BetterMeter? BetterMeter is a web and developer tool analytics platform designed for the AI-first internet. Unlike traditional analytics (Google Analytics, Plausible, Fathom), BetterMeter tracks not just website visitors but also CLI tool usage, MCP server tool invocations, and API endpoint traffic — all in one dashboard. BetterMeter answers questions that traditional analytics cannot: - How much traffic comes from ChatGPT, Claude, Perplexity, and other AI platforms? - Which AI crawlers (GPTBot, ClaudeBot, etc.) are indexing your site, and how often? - Which CLI commands do developers use most? What is the error rate? - Which AI clients (Claude Code, Cursor, Windsurf) invoke your MCP server tools? - Which API endpoints are slowest? What is the error rate by endpoint? - How do LLMs describe your brand in AI search results? ## Key Differentiators - **AI Traffic Attribution**: Identifies visitors referred by ChatGPT, Claude, Perplexity, Gemini, and Copilot. No other analytics platform does this. - **Four Source Types**: Tracks websites, CLI tools, MCP servers, and APIs through the same pipeline. - **Privacy by Default**: No cookies, no fingerprinting, no PII storage. GDPR compliant without consent banners. - **MCP Server Native**: BetterMeter itself runs as an MCP server, so AI assistants can query your analytics directly. - **Search Rankings & AI Visibility**: Tracks your Google search rankings, monitors how AI chatbots mention your brand, and analyzes your backlink profile. ## Features ### AI Traffic Attribution See exactly how many visitors come from ChatGPT, Claude, Perplexity, Gemini, and Copilot. Understand which AI platforms drive real engagement to your site. BetterMeter detects AI referrals by parsing referrer headers and user agent strings for known AI platform patterns. - [Learn more](https://bettermeter.com/features/ai-traffic-attribution) ### Bot & Crawler Analytics Track GPTBot, ClaudeBot, Googlebot, and 30+ crawlers. Know which bots hit your site, how often, and which pages they index. Filter by category: AI crawlers, search engines, monitoring bots, and scrapers. - [Learn more](https://bettermeter.com/features/bot-crawler-analytics) ### CLI Analytics Track how developers use your CLI tool. See top commands, error rates, execution duration, CI vs local usage, and usage trends over time. Integrates with Commander.js via auto-wrapping or manual tracking. - [Learn more](https://bettermeter.com/features/cli-analytics) ### MCP Server Analytics Track which tools AI clients invoke on your MCP server. See Claude vs Cursor vs Windsurf breakdown, success rates, latency, and token usage. Auto-wraps MCP server tool handlers with zero code changes. - [Learn more](https://bettermeter.com/features/mcp-analytics) ### API Analytics Monitor API endpoints with Express middleware or manual tracking. See top endpoints, error rates, latency, and caller patterns. One line to add to an Express app. - [Learn more](https://bettermeter.com/features/api-analytics) ### Privacy-First Analytics No cookies, no fingerprinting, no local storage, no PII. IP addresses are SHA-256 hashed with daily salt rotation — raw IPs are never stored. GDPR, CCPA, and PECR compliant by default. No consent banner required. - [Learn more](https://bettermeter.com/features/privacy-first-analytics) ### Live Visitors Real-time live visitor count powered by activity-gated heartbeats. The browser tracker sends a heartbeat every 30 seconds while the tab is visible and the user is active. Live counts are stored in Redis sorted sets and expire after 60 seconds of inactivity. Opt out with the `data-no-heartbeat` attribute on the script tag. - Dashboard: green pulsing dot with live count, refreshes every 10 seconds - CLI: `bettermeter live -s [--json]` - MCP: `bettermeter_live_visitors` tool - API: `GET /api/analytics/live?siteId=...` returns `{ live: number }` ### Search Rankings & AI Visibility Track your Google search rankings, see how ChatGPT, Claude, and Perplexity mention your brand, and monitor your backlink profile. Visibility score (0-100), competitor comparison, and ranking alerts. - [Learn more](https://bettermeter.com/features/brand-monitoring) ### Pulse AI Proactive analytics intelligence that works while you sleep. Pulse automatically detects anomalies (traffic spikes/drops, error rate changes, bot surges, new referrer sources), surfaces actionable insights (trends, growth opportunities, milestones), computes a unified product health score (0-100, grade A-F), forecasts traffic trends with confidence intervals, compares time periods, and delivers daily or weekly briefings. Set up monitoring alerts to get notified when conditions are met. - Dashboard: Pulse slide-out panel with Briefing, Insights, Forecast, and Alerts tabs - CLI: `bettermeter pulse insights|health|briefing|forecast|compare|alerts` - MCP: `bettermeter_pulse_insights`, `bettermeter_pulse_health`, `bettermeter_pulse_briefing`, `bettermeter_pulse_forecast`, `bettermeter_pulse_compare`, `bettermeter_pulse_alerts_list`, `bettermeter_pulse_alerts_create`, `bettermeter_pulse_alerts_delete`, `bettermeter_pulse_notifications` - API: `GET /api/pulse/insights|health|briefing|forecast|compare|alerts|notifications` ## Integrations BetterMeter tracks four event sources through a single pipeline: | Source | Integration | Event | |--------|------------|-------| | Website | ` ``` ### Track Custom Events (Web) ```javascript window.bettermeter.track("signup", { plan: "pro" }); window.bettermeter.identify("user_123"); ``` ### Track a CLI Tool ```typescript import { BetterMeter } from "@bettermeter/node"; const bm = new BetterMeter({ siteId: "my-cli", apiKey: "bm_..." }); // Auto-track all Commander.js commands bm.wrapCommander(program, { version: "1.0.0" }); // Or track manually bm.trackCommand({ command: "deploy", flags: ["--prod"], durationMs: 3400, exitCode: 0, }); ``` ### Track an MCP Server ```typescript import { BetterMeter } from "@bettermeter/node"; const bm = new BetterMeter({ siteId: "my-mcp", apiKey: "bm_..." }); // Auto-track all tool invocations (zero code changes to existing tools) bm.wrapMcpServer(server); // Or track manually bm.trackTool({ tool: "search_docs", client: "claude-code", durationMs: 250, success: true, }); ``` ### Track an API ```typescript import { BetterMeter } from "@bettermeter/node"; const bm = new BetterMeter({ siteId: "my-api", apiKey: "bm_..." }); // Express middleware (one line) app.use(bm.expressMiddleware()); // Or track manually bm.trackApi({ method: "GET", endpoint: "/api/users", statusCode: 200, durationMs: 45, }); ``` ## Node SDK — @bettermeter/node Install: `npm install @bettermeter/node` Zero dependencies. Requires Node.js 18+. ### Constructor `new BetterMeter(config)` | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | siteId | string | Yes | Domain or identifier registered in BetterMeter | | apiKey | string | Yes | API key from dashboard (starts with bm_) | | apiUrl | string | No | API URL. Default: https://bettermeter.com | | disabled | boolean | No | Disable tracking. Default: false | | batch | boolean | No | Queue events and flush on interval. Default: false | | batchInterval | number | No | Flush interval in ms. Default: 5000 | ### Methods - `trackCommand(opts)` — Track a CLI command invocation - `trackTool(opts)` — Track an MCP tool invocation - `trackApi(opts)` — Track an API request - `wrapCommander(program, opts?)` — Auto-track all Commander.js commands - `wrapMcpServer(server)` — Auto-track all MCP tool calls on an McpServer instance - `expressMiddleware()` — Returns Express/Connect middleware for API tracking - `reportBotVisit(request, siteId, options?)` — Server-side bot detection for Next.js/Edge middleware (import from `@bettermeter/node/middleware`) - `flush()` — Send all queued events immediately - `shutdown()` — Stop batch timer and flush. Call before process exit. ### Environment Variables - `BETTERMETER_DISABLED=1` — Disable tracking globally (useful for tests) ## CLI Install: `npm install -g bettermeter` The CLI renders rich visual output by default — ASCII line charts for timeseries, horizontal bar charts for ranked data, sparklines in overview stat cards, and styled tables with box-drawing borders. Colors auto-detect terminal capabilities and respect `NO_COLOR`. Use `--json` for raw JSON output (ideal for scripting or piping to `jq`). All analytics commands accept: `-s/--site `, `-r/--range `, `-l/--limit `, `--json`. ### Real-Time - `bettermeter live -s [--json]` — Live visitor count ### Authentication - `bettermeter login -t -u ` — Authenticate with API key and dashboard URL - `bettermeter logout` — Remove stored credentials - `bettermeter whoami` — Show current authenticated user ### Web Analytics - `bettermeter stats` — Overview: visitors, pageviews, sessions + period-over-period change - `bettermeter pages` — Top pages by visitor count - `bettermeter sources` — Traffic sources (--filter all|ai|traditional) - `bettermeter ai-traffic` — AI referral breakdown by platform - `bettermeter bots` — Bot/crawler traffic (--category all|ai-crawler|search|monitoring|scraper) - `bettermeter timeseries` — Daily visitor and pageview trend - `bettermeter countries` — Visitors by country - `bettermeter devices` — Device type breakdown - `bettermeter browsers` — Browser breakdown - `bettermeter campaigns` — Campaign URL attribution (UTM + click IDs) - `bettermeter channels` — Channel breakdown (Direct, Paid Search, Organic, etc.) - `bettermeter export` — Full analytics report (--format json|csv|md) ### CLI Analytics - `bettermeter cli-overview` — CLI usage summary: invocations, callers, success rate, avg duration - `bettermeter cli-commands` — Top CLI commands by invocation count - `bettermeter cli-timeseries` — CLI daily activity trend ### MCP Analytics - `bettermeter mcp-overview` — MCP usage summary: invocations, callers, success rate, avg duration - `bettermeter mcp-tools` — Top MCP tools by invocation count - `bettermeter mcp-clients` — MCP client breakdown (Claude, Cursor, Windsurf, etc.) - `bettermeter mcp-timeseries` — MCP daily activity trend ### API Analytics - `bettermeter api-overview` — API usage summary: invocations, callers, error rate, avg duration - `bettermeter api-endpoints` — Top API endpoints by invocation count - `bettermeter api-timeseries` — API daily activity trend ### Search Rankings & AI Visibility - `bettermeter brand-report -q ` — Generate search rankings visibility report - `bettermeter brand-config ` — View or update search rankings configuration - `bettermeter brand-compare -q ` — Compare rankings vs competitors - `bettermeter brand-alerts ` — Manage ranking alert rules (list, create, delete) - `bettermeter backlinks ` — Backlink profile: domain rank, referring domains, new/lost links ### Search Rankings & AI Visibility - `bettermeter brand-report -q ` — Generate search rankings visibility report - `bettermeter brand-config ` — View or update search rankings configuration - `bettermeter brand-compare -q ` — Compare rankings vs competitors - `bettermeter brand-alerts ` — Manage ranking alert rules (list, create, delete) - `bettermeter ai-mentions -q ` — Check brand mentions across AI chatbots - `bettermeter backlinks ` — Backlink profile: domain rank, referring domains, new/lost links ### Pulse AI - `bettermeter pulse insights` — Get proactive insights, anomalies, and opportunities - `bettermeter pulse health` — Product health score (0-100, grade A-F) - `bettermeter pulse briefing` — Daily or weekly briefing summary (-p/--period daily|weekly) - `bettermeter pulse forecast` — Traffic/usage forecast (-m/--metric, -d/--days) - `bettermeter pulse compare` — Compare two time periods (-r/--range, --from2, --to2) - `bettermeter pulse alerts` — List monitoring alert rules - `bettermeter pulse alerts:create` — Create alert (-t/--type, -n/--name, -c/--condition) - `bettermeter pulse alerts:delete` — Delete an alert (-i/--id) - `bettermeter pulse notifications` — Recent notifications (--unread for unread only) ### Billing - `bettermeter billing` — Show current plan, usage, and billing info (--json) ### Site Management - `bettermeter sites list` — List all sites - `bettermeter sites add ` — Add a new site - `bettermeter sites remove ` — Remove a site - `bettermeter sites info ` — Show site details and tracking snippet - `bettermeter install ` — Get the tracker snippet for a site ### Team Management - `bettermeter members list -s ` — List site members - `bettermeter members add -s -r ` — Add a member (viewer|editor|admin) - `bettermeter members remove -s ` — Remove a member - `bettermeter members update-role -s -r ` — Update member role ## MCP Server BetterMeter runs as a Model Context Protocol (MCP) server, allowing AI assistants (Claude, Cursor, Windsurf, etc.) to query analytics data directly. ### Setup Add to your `.mcp.json` or MCP client configuration: ```json { "mcpServers": { "bettermeter": { "command": "npx", "args": ["bettermeter"] } } } ``` ### Available MCP Tools #### Real-Time - `bettermeter_live_visitors` — Get current live visitor count for a site #### Web Analytics - `bettermeter_stats` — Overview stats: visitors, pageviews, sessions with period-over-period change - `bettermeter_pages` — Top pages by visitor count - `bettermeter_sources` — Traffic sources with AI referral detection - `bettermeter_ai_traffic` — AI traffic breakdown by platform (ChatGPT, Claude, Perplexity, etc.) - `bettermeter_bots` — Bot and crawler traffic with category filtering - `bettermeter_timeseries` — Daily visitor and pageview counts over time - `bettermeter_countries` — Visitors by country - `bettermeter_devices` — Device type breakdown (mobile, tablet, desktop) - `bettermeter_browsers` — Browser breakdown - `bettermeter_visitors` — List recent visitors with activity summary - `bettermeter_visitor` — Detailed visitor profile with event timeline - `bettermeter_events` — Custom events with counts - `bettermeter_campaigns` — Campaign URL attribution (UTM + click IDs) - `bettermeter_channels` — Channel breakdown (Direct, Paid Search, Organic, etc.) - `bettermeter_export` — Export full analytics report (JSON or Markdown; CSV not available via MCP) #### CLI Analytics - `bettermeter_cli_overview` — CLI usage: invocations, callers, success rate, avg duration - `bettermeter_cli_commands` — Top CLI commands by invocation count - `bettermeter_cli_timeseries` — CLI daily invocation and caller counts #### MCP Analytics - `bettermeter_mcp_overview` — MCP usage: invocations, callers, success rate, avg duration - `bettermeter_mcp_tools` — Top MCP tools by invocation count - `bettermeter_mcp_clients` — MCP client breakdown (Claude, Cursor, etc.) - `bettermeter_mcp_timeseries` — MCP daily invocation and caller counts #### API Analytics - `bettermeter_api_overview` — API usage: invocations, callers, error rate, avg duration - `bettermeter_api_endpoints` — Top API endpoints by invocation count - `bettermeter_api_timeseries` — API daily invocation and caller counts #### Site Management - `bettermeter_sites_list` — List all configured sites - `bettermeter_sites_add` — Add a new site to track - `bettermeter_sites_remove` — Remove a site - `bettermeter_sites_info` — Get site details and tracking snippet - `bettermeter_install` — Get the tracking snippet to install on a website #### Team Management - `bettermeter_members_list` — List all members for a site - `bettermeter_members_add` — Add a member or send invitation - `bettermeter_members_remove` — Remove a member - `bettermeter_members_update_role` — Update a member's role #### Search Rankings & AI Visibility - `bettermeter_brand_report` — Generate search rankings visibility report - `bettermeter_brand_config` — View or update search rankings configuration - `bettermeter_brand_compare` — Compare rankings against competitors - `bettermeter_brand_alerts` — Manage ranking alert rules - `bettermeter_ai_mentions` — Check brand mentions across AI chatbots (ChatGPT, Perplexity, Gemini, Copilot, Grok) - `bettermeter_backlinks` — Backlink profile: domain rank, referring domains, new/lost links #### Billing - `bettermeter_billing` — Show current plan, usage limits, and billing information #### Pulse AI - `bettermeter_pulse_insights` — Get proactive insights: anomalies, trends, opportunities, milestones - `bettermeter_pulse_health` — Product health score (0-100, grade A-F) with category breakdown - `bettermeter_pulse_briefing` — Daily or weekly briefing summary with key metrics - `bettermeter_pulse_forecast` — Forecast traffic/usage trends with confidence intervals - `bettermeter_pulse_compare` — Compare two time periods side-by-side with delta analysis - `bettermeter_pulse_alerts_list` — List monitoring alert rules - `bettermeter_pulse_alerts_create` — Create a monitoring alert rule - `bettermeter_pulse_alerts_delete` — Delete a monitoring alert rule - `bettermeter_pulse_notifications` — Get recent notifications with read/unread status All analytics tools accept: `site_id` (string), `range` (today|7d|30d|90d|12m), `limit` (1-100). ## API Endpoints Authenticate with `Authorization: Bearer `. All query endpoints accept `?siteId=...&from=YYYY-MM-DD&to=YYYY-MM-DD`. ### Real-Time & Heartbeat - `GET /api/analytics/live` — Live visitor count. Returns `{ live: number }`. Accepts `?siteId=...` - `POST /api/heartbeat` — Receive browser heartbeats for live visitor tracking - `POST /api/h` — Stealth alias for /api/heartbeat (ad-blocker resistant) ### Event Ingestion - `POST /api/event` — Ingest an event (web, CLI, MCP, or API). Returns 202. ### Web Analytics - `GET /api/analytics/overview` — Visitors, pageviews, sessions + % change - `GET /api/analytics/pages` — Top pages by visitor count - `GET /api/analytics/sources` — Traffic sources with AI detection - `GET /api/analytics/ai-traffic` — AI referral breakdown by platform - `GET /api/analytics/bots` — Bot/crawler traffic - `GET /api/analytics/timeseries` — Daily visitor/pageview trend - `GET /api/analytics/countries` — Visitors by country - `GET /api/analytics/devices` — Device type breakdown - `GET /api/analytics/browsers` — Browser breakdown - `GET /api/analytics/visitors` — Visitor list with activity - `GET /api/analytics/visitors/[visitorId]` — Visitor profile - `GET /api/analytics/events` — Custom events - `GET /api/analytics/campaigns` — Campaign URL attribution - `GET /api/analytics/channels` — Channel breakdown - `GET /api/analytics/session-stats` — Session statistics ### CLI Analytics - `GET /api/analytics/cli-overview` — Invocations, callers, success rate - `GET /api/analytics/cli-commands` — Top commands - `GET /api/analytics/cli-timeseries` — Daily CLI activity ### MCP Analytics - `GET /api/analytics/mcp-overview` — Invocations, callers, success rate - `GET /api/analytics/mcp-tools` — Top tools - `GET /api/analytics/mcp-clients` — Client breakdown - `GET /api/analytics/mcp-timeseries` — Daily MCP activity ### API Analytics - `GET /api/analytics/api-overview` — Invocations, callers, error rate - `GET /api/analytics/api-endpoints` — Top endpoints - `GET /api/analytics/api-timeseries` — Daily API activity ### Search Rankings & AI Visibility - `GET /api/analytics/brand` — Search rankings visibility report - `GET /api/analytics/brand/history` — Historical ranking data - `GET /api/analytics/brand/compare` — Competitor comparison - `GET /api/analytics/brand/alerts` — Ranking alert rules - `GET /api/analytics/brand/export` — Export ranking data - `GET /api/analytics/backlinks` — Backlink profile with domain rank and referring domains - `GET /api/analytics/ai-mentions` — AI chatbot brand mentions - `GET /api/analytics/ai-mentions/history` — AI mention history ### Pulse AI - `GET /api/pulse/insights` — Anomalies, trends, opportunities, milestones - `GET /api/pulse/health` — Product health score (0-100) with category breakdown - `GET /api/pulse/briefing` — Daily or weekly briefing summary - `GET /api/pulse/forecast` — Traffic/usage forecast with confidence intervals - `GET /api/pulse/compare` — Period-over-period deep comparison - `GET /api/pulse/alerts` — List monitoring alert rules - `POST /api/pulse/alerts` — Create a new alert rule - `DELETE /api/pulse/alerts` — Delete an alert rule - `GET /api/pulse/notifications` — Get recent notifications - `PATCH /api/pulse/notifications` — Mark notifications as read - `POST /api/pulse/chat` — Pulse AI chat (streaming) ### Tracker Script - `GET /api/script` — Serves the browser tracking script (~1.3KB gzipped IIFE). Includes heartbeat support for live visitor tracking. - `GET /api/pixel` — Tracking pixel ## Privacy Model BetterMeter is designed to be privacy-compliant by default: - **No cookies** — No cookies, local storage, or session storage are used - **No fingerprinting** — No canvas, WebGL, or font fingerprinting - **No PII storage** — IP addresses are SHA-256 hashed with a daily-rotating salt. Raw IPs are never stored. - **Stable visitor IDs** — A separate hash (without date) enables per-site visitor profiles that cannot be reversed - **CLI/MCP privacy** — Only command/tool names and flag names are tracked. Flag values, arguments, and file paths are never sent. - **Fire-and-forget** — Analytics SDK failures never break the host application - **Opt-out** — Set `disabled: true` in SDK config or `BETTERMETER_DISABLED=1` environment variable - **GDPR compliant** — No consent banner needed. No personal data is collected or stored. ## Proxy Setup (Bypass Ad Blockers) BetterMeter supports first-party proxying. Configure URL rewrites on your domain: - `/bm/s` → `https://bettermeter.com/api/s` (tracker script) - `/bm/e` → `https://bettermeter.com/api/e` (event endpoint) - `/bm/p` → `https://bettermeter.com/api/p` (tracking pixel) Platform-specific guides available for Next.js, Nuxt, SvelteKit, Astro, Remix, Nginx, Caddy, Apache, and Rails. ## Pricing BetterMeter offers four plans. AI traffic attribution is free on all plans. | Plan | Price (annual) | Events/mo | Sites | Data Retention | Key Features | |------|---------------|-----------|-------|----------------|-------------| | Free | $0 | 10K | 1 | 30 days | Web analytics, AI traffic attribution | | Starter | $12/mo | 100K | 3 | 12 months | + CLI, MCP, API analytics, full bot detection | | Pro | $39/mo | 1M | 10 | 24 months | + Brand monitoring, AI mentions, data export | | Business | $99/mo | 5M | Unlimited | Unlimited | + Full API access, unlimited seats | Monthly billing also available (Starter $16/mo, Pro $49/mo, Business $129/mo). - CLI and MCP analytics require Starter plan or above - Brand monitoring and AI mentions require Pro plan or above - [See full pricing](https://bettermeter.com/pricing) ## Docs & Links - [Documentation](https://bettermeter.com/docs) - [Getting Started](https://bettermeter.com/docs#getting-started) - [Web Tracking Guide](https://bettermeter.com/docs#web-tracking) - [CLI Tracking Guide](https://bettermeter.com/docs#cli-tracking) - [MCP Server Tracking Guide](https://bettermeter.com/docs#mcp-tracking) - [API Tracking Guide](https://bettermeter.com/docs#api-tracking) - [SDK Reference](https://bettermeter.com/docs#sdk-reference) - [CLI Reference](https://bettermeter.com/docs#cli-reference) - [MCP Tools Reference](https://bettermeter.com/docs#mcp-tools-reference) - [API Reference](https://bettermeter.com/docs#api-reference) - [Proxy Setup](https://bettermeter.com/docs#proxy-setup) - [Data Model](https://bettermeter.com/docs#data-model) - [Privacy](https://bettermeter.com/docs#privacy) - [Pricing](https://bettermeter.com/pricing) - [Features Overview](https://bettermeter.com/features) - [AI Traffic Attribution](https://bettermeter.com/features/ai-traffic-attribution) - [Bot & Crawler Analytics](https://bettermeter.com/features/bot-crawler-analytics) - [CLI Analytics](https://bettermeter.com/features/cli-analytics) - [MCP Server Analytics](https://bettermeter.com/features/mcp-analytics) - [API Analytics](https://bettermeter.com/features/api-analytics) - [Privacy-First Analytics](https://bettermeter.com/features/privacy-first-analytics) - [Search Rankings & AI Visibility](https://bettermeter.com/features/brand-monitoring) - [Extended Documentation for AI](https://bettermeter.com/llms-full.txt) ## Legal - [Privacy Policy](https://bettermeter.com/privacy) - [Terms of Service](https://bettermeter.com/terms) - [Data Processing Agreement](https://bettermeter.com/dpa) ## Comparisons ### BetterMeter vs Google Analytics Google Analytics uses cookies, requires consent banners, and cannot track CLI tools, MCP servers, or APIs. BetterMeter is cookie-free, GDPR-compliant by default, and tracks all four source types. BetterMeter also detects AI traffic attribution, which Google Analytics does not support. ### BetterMeter vs Plausible / Fathom / Simple Analytics These tools are privacy-first like BetterMeter, but they only track websites. BetterMeter extends privacy-first analytics to CLI tools, MCP servers, and APIs. BetterMeter also provides AI traffic attribution, bot/crawler analytics, and search rankings, AI visibility, and backlink monitoring features that these alternatives lack. ### BetterMeter vs PostHog / Mixpanel PostHog and Mixpanel are product analytics tools focused on user behavior and funnels. BetterMeter is focused on traffic analytics across four source types (web, CLI, MCP, API) with AI-era features like AI traffic attribution, bot analytics, search rankings, and AI visibility. BetterMeter is also simpler and more privacy-focused. ## FAQ **What is BetterMeter?** BetterMeter is a privacy-first analytics platform that tracks websites, CLI tools, MCP servers, and APIs. It is designed for the AI-first internet and provides features like AI traffic attribution and bot crawler analytics that traditional analytics tools do not offer. **How does BetterMeter track AI traffic?** BetterMeter identifies visitors referred by AI platforms (ChatGPT, Claude, Perplexity, Gemini, Copilot) by parsing referrer headers and user agent strings for known AI platform patterns. This happens automatically for all tracked websites. **Does BetterMeter use cookies?** No. BetterMeter uses no cookies, no local storage, and no fingerprinting. It is GDPR compliant by default and requires no consent banner. **How do I track my MCP server with BetterMeter?** Install the `@bettermeter/node` SDK, create a BetterMeter instance with your site ID and API key, and call `bm.wrapMcpServer(server)` on your McpServer instance. All tool invocations are automatically tracked with timing and error data. **Can AI assistants query my BetterMeter analytics?** Yes. BetterMeter runs as an MCP server. Add it to your AI assistant's MCP configuration and the assistant can query all your analytics data using natural language. **What data does BetterMeter collect from CLI tools?** Command names, flag names (not values), version, duration, exit code, OS, and architecture. File paths, arguments, and flag values are never collected. **Is BetterMeter open source?** The tracking script and Node SDK are open source. The dashboard and analytics backend are proprietary.