For the complete documentation index, see llms.txt. This page is also available as Markdown.

Marketing attribution dashboards

First-touch vs last-touch, the FB social-vs-paid split, channel ROI.

Most analytics tools give you one big "Facebook" bucket. Millimetric splits paid Facebook from organic Facebook automatically — and gives you the rule that fired so you can audit. This recipe shows the queries to build the dashboards every marketer asks for.

What the classifier gives you

Every event row has:

source              "facebook" | "google" | "twitter" | "direct" | "internal" | ...
medium              "paid" | "organic" | "social" | "email" | "referral" | "direct"
campaign            utm_campaign, if any
source_confidence   "low" | "medium" | "high"
source_rule_id      which classifier rule fired

Full rule cascade in Attribution. Highlights:

  • gclid → google/paid

  • fbclid via l.facebook.com → facebook/paid (high)

  • fbclid from elsewhere → facebook/paid (medium)

  • referrer = facebook.com without fbclid → facebook/social

  • utm_source=facebook&utm_medium=cpc → facebook/paid

Channel breakdown — top of the dashboard

curl -G "https://api.millimetric.ai/v1/sources" \
  -H "Authorization: Bearer $RK_KEY" \
  --data-urlencode "from=2026-05-01T00:00:00Z" \
  --data-urlencode "to=2026-06-01T00:00:00Z" \
  --data-urlencode "breakdown=source_medium" | jq

First-touch vs last-touch

The classifier evaluates each event independently — that's per-event truth. For "where did this customer come from", attribute by first touch on the visitor, not the last event.

First-touch per visitor

Last-touch per visitor (just before conversion)

Channel ROI — revenue per channel

Combines completed_checkout (revenue) with first-touch source (the channel that brought them in).

Confidence-filtered attribution

When you want clean numbers (e.g. for board reporting), exclude low-confidence rows:

Or only high-confidence:

For fbclid-arrived events on non-Meta-redirect hosts, confidence is medium because fbclid can leak onto organic shares. Filter accordingly when revenue numbers matter.

The Facebook social-vs-paid headline

This is the question the product was built to answer cleanly:

Most analytics tools give you the union of those two rows. You can now act on the difference: paid Facebook converts 2.8× organic — fine, double down on ads, and don't optimize organic for conversion.

Per-rule audit (for the paranoid)

Want to see exactly which classifier rule fired most often this week?

This is the dashboard for "is the classifier behaving how I expect on real traffic". When unknown/low shows up at the top, one of your campaigns is missing UTMs.

Building this in your own dashboard

Hit /v1/sources and /v1/stats from a server-side (Node, Python, Ruby) backend with an rk_* key, then render charts however you like. Sample minimal Next.js handler:

Keep the rk_* key on the server. Never ship it to the browser.

See also

Last updated

Was this helpful?