home / skills / phrazzld / claude-config / marketing-dashboard

marketing-dashboard skill

/skills/marketing-dashboard

This skill provides a unified marketing metrics dashboard and CLI to monitor traffic, seo, ads, revenue, and funnels from PostHog, GSC, Stripe, and ads.

npx playbooks add skill phrazzld/claude-config --skill marketing-dashboard

Review the files below or copy the command above to add this skill to your agents.

Files (7)
SKILL.md
2.2 KB
---
name: marketing-dashboard
description: Unified marketing metrics dashboard and CLI. Use when building or running a marketing status dashboard that pulls from PostHog, Google Search Console, Stripe, and ad platforms. Covers traffic, SEO, ads, revenue, and funnel conversion reporting in terminal output.
effort: high
---

# Marketing Dashboard

Unified CLI for marketing metrics. Built for quick status checks and deeper dives.

## Quick Start

```bash
./dashboard.py status
./dashboard.py seo --period 30d
./dashboard.py ads --period 7d
./dashboard.py revenue --period 90d
./dashboard.py funnel
```

## Commands

- `mktg status` - Traffic (7d), revenue (30d), top errors
- `mktg seo --period [7d|30d|90d]` - GSC clicks, impressions, avg position, top queries
- `mktg ads --period [7d|30d]` - Spend, impressions, clicks, CPA by platform
- `mktg revenue --period [30d|90d]` - MRR, churn, new subs, revenue by product
- `mktg funnel` - Funnel: visit → signup → trial → paid

## Environment

| Variable | Purpose |
| --- | --- |
| `POSTHOG_API_KEY` | PostHog API key |
| `POSTHOG_PROJECT_ID` | PostHog project id |
| `GSC_SITE_URL` | Search Console property URL |
| `GOOGLE_APPLICATION_CREDENTIALS` | Service account JSON path |
| `STRIPE_SECRET_KEY` | Stripe API key |
| `ADS_METRICS_PATH` | JSON file for ad platform metrics |
| `ADS_METRICS_JSON` | Inline JSON for ad metrics |
| `FUNNEL_STEPS` | Comma list of PostHog events (default: `$pageview,signup,trial,paid`) |

### Ads JSON Shape

```json
{
  "google": {"spend": 123.45, "impressions": 10000, "clicks": 321, "cpa": 12.34},
  "meta": {"spend": 98.76, "impressions": 9000, "clicks": 210, "cpa": 15.67}
}
```

## Files

- `dashboard.py` - Click CLI entrypoint (`mktg`)
- `src/posthog_client.py` - PostHog API wrapper via `httpx`
- `src/gsc_client.py` - Search Console wrapper via `google-auth` + `googleapiclient`
- `src/stripe_client.py` - Stripe metrics wrapper
- `src/display.py` - Rich tables and formatting

## Notes

- Prefer PostHog for traffic and funnel. Uses `insights/trend` and `insights/funnel`.
- GSC reads only. Requires Search Console access for the service account.
- Stripe metrics are computed from subscriptions and invoices; keep product naming consistent.

Overview

This skill provides a unified CLI and terminal dashboard for marketing metrics across PostHog, Google Search Console, Stripe, and ad platforms. It surfaces traffic, SEO, ads, revenue, and funnel conversion reporting in a compact, scriptable interface. Use it for quick status checks or deeper investigations without jumping between vendor UIs.

How this skill works

The CLI queries PostHog for traffic and funnel events, Google Search Console for clicks/impressions/position, Stripe for subscription and invoice-based revenue, and reads ad metrics from a JSON source. Results are aggregated and rendered as rich terminal tables and summaries, with commands for status, seo, ads, revenue, and funnel. Environment variables and a JSON ads payload configure credentials and data sources for reproducible runs.

When to use it

  • Run quick health checks during standups or on-call shifts
  • Review SEO trends and top queries before content planning
  • Compare ad spend, impressions, and CPA across platforms
  • Audit revenue, MRR, churn, and product-level income
  • Inspect funnel conversion stages from visit to paid in terminal

Best practices

  • Set service credentials as environment variables and restrict service account Search Console access
  • Keep product and plan naming consistent in Stripe to ensure accurate revenue grouping
  • Version-control ads JSON or point to a stable ADS_METRICS_PATH for reproducible reports
  • Use short periods (7d/30d) for operational checks and longer windows (90d) for trend analysis
  • Prefer PostHog for event/funnel accuracy; use GSC only for organic search metrics

Example use cases

  • mktg status for a one-line snapshot: traffic, recent revenue, and top errors
  • mktg seo --period 30d to collect clicks, impressions, avg position, and top queries for a content review
  • mktg ads --period 7d to compare CPA, spend, and impressions across Google and Meta before optimizing bids
  • mktg revenue --period 90d to compute MRR, churn, new subscriptions, and revenue by product
  • mktg funnel to inspect conversion drop-offs between visit → signup → trial → paid

FAQ

What credentials are required?

You need PostHog API key and project id, Google service account with Search Console access, Stripe secret key, and either ADS_METRICS_PATH or ADS_METRICS_JSON for ads.

How are ad metrics provided?

Ad metrics come from a JSON file or inline JSON matching the documented shape (platform keys with spend, impressions, clicks, cpa).