← Back to Skills Marketplace
soybelli

Millimetric Query

by soybelli · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ Security Clean
99
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install millimetric-query
Description
Query Millimetric analytics — top sources, aggregate stats, raw events, and the Facebook social-vs-paid split. Use when the user asks "where does my traffic...
README (SKILL.md)

Millimetric Query

Read-only analytics queries against Millimetric. Uses an rk_live_… key (read scope). The headline feature is /v1/sources — it's the endpoint that surfaces Facebook social vs Facebook paid as separate rows.

When to Use

  • User asks for traffic sources, breakdowns, top channels
  • "How many signups / purchases / pageviews in the last N days"
  • Facebook (or any source) paid-vs-organic split
  • Pulling raw events for debugging or ad-hoc analysis
  • Building a quick dashboard / cron report from the CLI

When NOT to Use

  • Sending events → millimetric-track
  • Connecting an agent natively → millimetric-mcp-setup (MCP is usually nicer for AI)

Setup

export MILLIMETRIC_RK=rk_live_...                   # read-only key
export MILLIMETRIC_HOST=https://api.millimetric.ai

Quick start

Top sources (with FB social vs paid)

curl -sG "$MILLIMETRIC_HOST/v1/sources" \
  -H "Authorization: Bearer $MILLIMETRIC_RK" \
  --data-urlencode "from=2026-05-01T00:00:00Z" \
  --data-urlencode "to=2026-06-01T00:00:00Z" \
  --data-urlencode "breakdown=source_medium" | jq

Returns rows like:

{ "source": "facebook", "medium": "paid",   "events": 6, "uniques": 6, "paid_share": 1.0 }
{ "source": "facebook", "medium": "social", "events": 3, "uniques": 3, "paid_share": 0.0 }

For "what % of each source is paid", use breakdown=sourcepaid_share becomes meaningful (0.0 → 1.0).

Aggregate stats

# Daily signups grouped by source/medium
curl -sG "$MILLIMETRIC_HOST/v1/stats" \
  -H "Authorization: Bearer $MILLIMETRIC_RK" \
  --data-urlencode "metric=count" \
  --data-urlencode "from=2026-05-01T00:00:00Z" \
  --data-urlencode "to=2026-05-17T00:00:00Z" \
  --data-urlencode "event=signup" \
  --data-urlencode "group_by=source,medium" \
  --data-urlencode "interval=day" | jq

Parameters:

Param Values
metric count, uniques
from / to ISO 8601 (inclusive / exclusive)
event optional event name filter
group_by comma list — any of source, medium, campaign, country, device_type, browser, os, path, event_name
interval hour, day, week, month (omit for a single bucket)

Raw events

curl -sG "$MILLIMETRIC_HOST/v1/query" \
  -H "Authorization: Bearer $MILLIMETRIC_RK" \
  --data-urlencode "from=2026-05-01T00:00:00Z" \
  --data-urlencode "to=2026-05-17T00:00:00Z" \
  --data-urlencode "event=signup" \
  --data-urlencode "limit=100" | jq

Filters: event, source, medium, country, user_id, anonymous_id, limit (1–1000).

Recipes

"What's our Facebook paid-vs-organic split this month?"

curl -sG "$MILLIMETRIC_HOST/v1/sources" \
  -H "Authorization: Bearer $MILLIMETRIC_RK" \
  --data-urlencode "from=$(date -u -v1d +%Y-%m-%dT00:00:00Z)" \
  --data-urlencode "to=$(date -u +%Y-%m-%dT00:00:00Z)" \
  | jq '.rows[] | select(.source=="facebook")'

"Daily unique signups by country, last 7 days"

curl -sG "$MILLIMETRIC_HOST/v1/stats" \
  -H "Authorization: Bearer $MILLIMETRIC_RK" \
  --data-urlencode "metric=uniques" \
  --data-urlencode "event=signup" \
  --data-urlencode "from=$(date -u -v-7d +%Y-%m-%dT00:00:00Z)" \
  --data-urlencode "to=$(date -u +%Y-%m-%dT00:00:00Z)" \
  --data-urlencode "group_by=country" \
  --data-urlencode "interval=day" | jq

"What did user_42 do this week?"

curl -sG "$MILLIMETRIC_HOST/v1/query" \
  -H "Authorization: Bearer $MILLIMETRIC_RK" \
  --data-urlencode "user_id=user_42" \
  --data-urlencode "from=$(date -u -v-7d +%Y-%m-%dT00:00:00Z)" \
  --data-urlencode "to=$(date -u +%Y-%m-%dT00:00:00Z)" \
  --data-urlencode "limit=200" \
  | jq '.rows[] | { ts: .timestamp, event: .event_name, source: .source, medium: .medium }'

Reading the attribution columns

Every event has source / medium / source_confidence / source_rule_id set by the server-side classifier. The rule cascade (first-match):

  1. Network click IDs (gclid, msclkid, ttclid, li_fat_id) → paid / high
  2. fbclid via l.facebook.com / lm.facebook.com → facebook/paid / high
  3. fbclid + utm_source=facebook|instagram|meta → paid / high
  4. utm_medium=cpc|paid|paid_social|cpm|display → paid / high
  5. fbclid alone → facebook/paid / medium
  6. Explicit UTM → source/utm_medium / high
  7. Facebook referrer, no fbclid → facebook/social / medium
  8. Other social referrers (twitter, linkedin, reddit, tiktok, …) → social / medium
  9. Search engines → organic / medium
  10. Email clients → email/email / medium
  11. Same-host referrer → internal/direct / high
  12. Nothing → direct/direct / high
  13. Else → host slug / referral / low

source_rule_id lets you audit which rule matched.

Common errors

Status error Fix
401 invalid_api_key Wrong key; must be rk_*.
403 insufficient_scope Used pk_*/sk_* — read endpoints want rk_*.
400 invalid_group_by Unknown column in group_by.
400 invalid_params Bad ISO dates or out-of-range limit.

See also

  • Sending events → millimetric-track
  • Native MCP for agents → millimetric-mcp-setup
Usage Guidance
This skill appears safe for its stated read-only analytics purpose. Before installing, confirm you intend to let the agent query Millimetric, use a read-only rk_* key, keep MILLIMETRIC_HOST pointed at the official Millimetric API, and avoid requesting or sharing broader raw event data than necessary.
Capability Analysis
Type: OpenClaw Skill Name: millimetric-query Version: 1.0.0 The skill bundle provides standard instructions and examples for querying the Millimetric analytics API using curl and jq. It requires a read-only API key (MILLIMETRIC_RK) and performs legitimate data retrieval tasks such as fetching traffic sources and event statistics from api.millimetric.ai without any signs of malicious intent or data exfiltration.
Capability Tags
requires-sensitive-credentials
Capability Assessment
Purpose & Capability
The skill is coherently focused on read-only Millimetric analytics queries, but it can retrieve raw events and user/anonymous ID filtered data.
Instruction Scope
The instructions are scoped to user-requested analytics questions and use read-only GET-style API queries; no destructive actions, goal overrides, or hidden behaviors are shown.
Install Mechanism
This is an instruction-only skill with no code files. The only install item is jq via Homebrew, with curl and jq required for documented command examples.
Credentials
The required MILLIMETRIC_RK credential is proportionate for querying the Millimetric API, but users should ensure it is an rk_* read key and keep it private.
Persistence & Privilege
No persistence, background process, local indexing, privilege escalation, or mutation authority is shown in the artifacts.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install millimetric-query
  3. After installation, invoke the skill by name or use /millimetric-query
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Initial release — query Millimetric analytics from the command line. - Supports querying top sources (with Facebook social vs paid split), aggregate stats, and raw event data. - Designed for read-only analytics use with an rk_live_* API key. - CLI recipes provided for common analytics questions like "FB paid vs organic", signups by country, and user history. - Requires jq and curl. - Error codes and troubleshooting guidance included.
Metadata
Slug millimetric-query
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is Millimetric Query?

Query Millimetric analytics — top sources, aggregate stats, raw events, and the Facebook social-vs-paid split. Use when the user asks "where does my traffic... It is an AI Agent Skill for Claude Code / OpenClaw, with 99 downloads so far.

How do I install Millimetric Query?

Run "/install millimetric-query" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Millimetric Query free?

Yes, Millimetric Query is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Millimetric Query support?

Millimetric Query is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Millimetric Query?

It is built and maintained by soybelli (@soybelli); the current version is v1.0.0.

💬 Comments