Getting Started

Mini Metrics makes it simple to track custom metrics with a single HTTP request. Here's how to send your first event:

curl -X POST https://mnmt.dev \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"m": "users.signup", "v": 1}'

You can find your API key in the dashboard after signing up.

Quick Examples

Using Query Parameters

The simplest way to send an event - just use query parameters. Use the short URL mnmt.dev for convenience:

curl "https://mnmt.dev?m=pageview&v=1&k=YOUR_API_KEY"

With Dimensions

Add dimensions to segment your data:

curl -X POST https://mnmt.dev \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"m": "purchase", "v": 99.99, "d": "premium"}'

Batch Events

Send multiple events in a single request:

curl -X POST https://mnmt.dev \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '[
    {"m": "users.login", "v": 1},
    {"m": "users.active", "v": 1},
    {"m": "api.latency", "v": 42.5}
  ]'