Skip to content

About

Marketing analytics agent — your AI runs REAL queries in your PostHog/GA4/Search Console and records results with full provenance (source + exact query). No invented numbers. Claude Code, OpenCode, Codex.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

Analytics Agent

Give your AI coding assistant a job: measure my marketing metrics every month — from real queries, with full provenance, and don't stop until the scorecard is complete.

Analytics Agent is a tiny, open, do-it-yourself marketing measurement worker. Install once into Claude Code, OpenCode, or Codex CLI, then just say:

"Record this month's numbers for every metric in my metrics file — real queries only."

Your AI runs actual queries in your PostHog / GA4 / Search Console / Cal.com / email dashboard and records results through an evidence gate: no number without its source system and the exact query that produced it. The engine builds a grouped scorecard with period-over-period deltas — where every value can be disputed by disputing its query.

No screenshot dashboards. No vibes. No invented numbers.


What you get

🧾 Provenance on every value Source system + exact query/click-path recorded with each number. Dispute a number by disputing its query.
📏 Definitions are law Only metrics defined in your metrics.md can be recorded — with their definitions, not the model's improvisation.
🔁 Honest history One value per metric per period. Corrections go through reject-and-re-add, never silent overwrites.
📈 Deltas built in Status shows each metric's latest value vs prior period automatically.
📄 Scorecard export Grouped Markdown report (or CSV) with full provenance per row.

Install (under 2 minutes)

curl -fsSL https://raw.githubusercontent.com/ShayanSpiel/Analytics-Agent/main/install.sh | bash

Or paste into your AI tool in an empty folder:

Install https://github.com/ShayanSpiel/Analytics-Agent following its AGENTS.md,
then help me define my metrics, then start recording my measurements until we hit the target.
Use only real queries against my analytics accounts; never estimate.

Daily use

You say What happens
"Record this month's numbers." Queries your systems, fills new periods
"How are we doing?" Scorecard summary with deltas
"That reply rate looks wrong." Shows the exact query behind it
"We redefined qualified leads." Updates metrics.md; future records follow
"Export the scorecard." Writes SCORECARD.md / .csv

No AI needed: python3 an.py status.

FAQ

Does it connect to PostHog itself? It drives YOUR AI tool, which connects through your own logged-in access or API keys. The engine stores results; it holds no credentials and makes no network calls of its own.

Can it invent missing numbers? The gate makes that pointless — no query, no record. Gaps stay visible as gaps, which is the honest state.

Cost? Free repo. Your AI tool usage applies its own pricing.


MIT licensed. Built by Shayan Spiel — part of SpielOS, an open-source AI company operating system. Want a measured growth department instead of DIY? Apply — free review.

About

Marketing analytics agent — your AI runs REAL queries in your PostHog/GA4/Search Console and records results with full provenance (source + exact query). No invented numbers. Claude Code, OpenCode, Codex.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages