Resources / Marketing / Build your own client growth dashboard with Claude Code
D

Build your own client growth dashboard with Claude Code

One private dashboard for Search Console, GA4, Tag Manager, Google Ads and Meta Ads, plus monthly plans, ad reports and client approvals. The full prompt.

Tested 29 Oct 2026Claude Code, Codex, any coding agentMarketingAdvanced
Watch on Instagram
Watch the reel firstOne dashboard for all your marketing data

What it does

The dashboard in the reel puts all of a client’s marketing data in one private web app:

  • Overview: traffic, leads and ad results from every source, with the change since last period
  • Action Center: a ranked to-do list built from the numbers, like “this page ranks 8-15 with high impressions, improve the title”
  • Monthly Ads Report: every Meta and Google Ads campaign for a month, with CSV and PDF export
  • Plans & Updates: the month’s plan the client can tick off, plus a log of finished work
  • Approvals: documents waiting for the client’s sign-off, with comments and versions

You don’t write the code. You paste one prompt into Claude Code, and it builds the dashboard in phases, stopping for your OK after each one.

What you’ll need

  • Claude Code (paid Claude plan) or another coding agent, and Node.js (nodejs.org, LTS version).
  • A Google Cloud project with the Search Console, GA4 Data, Tag Manager and Google Ads APIs turned on.
  • A Google Ads developer token and customer ID.
  • A Meta system-user access token and ad account ID.
Keep your keys private

Your API tokens give access to your clients’ ad accounts. Paste them only into the .env file Claude creates, never into a public chat, a screenshot or GitHub.

How to use it in 4 steps

  1. Make an empty folder

    Create a new, empty folder for the dashboard, for example D:\Projects\client-dashboard.

  2. Open Claude Code in it

    cd "D:\Projects\client-dashboard"; claude
  3. Fill in the brackets and paste the prompt

    Copy the prompt below. Replace the [BRACKETS] with your client’s details (business type, website, currency and time zone), then paste it in.

  4. Approve one phase at a time

    Claude builds Phase 1 (login and layout), shows it running and waits. Check it, say OK, and it moves to the next phase. It asks for your API keys when it reaches the data connectors.

    Don't skip the stopsBuilding in phases is what keeps the agent accurate. If you let it build everything at once, mistakes pile up.

The prompt

You are a senior full-stack engineer. Build me a client growth dashboard: one private web app that pulls my client's marketing data from Google Search Console, Google Analytics 4, Google Tag Manager, Google Ads and Meta Ads into a single view, plus a shared space for monthly plans, ad reports and content approvals.

## Context
- Business: [CLIENT TYPE — e.g. "a document-services company in Dubai"]
- Website: [DOMAIN]
- Who uses it: me (the agency, admin) and the client (viewer/approver). Non-technical client — the UI must be plain-English, no jargon.
- Currency / timezone: [AED / Asia/Dubai]
- Budget: free tiers only where possible.

## Stack (use exactly this unless you tell me why not)
- Next.js (App Router) + TypeScript, React server components. No UI framework beyond plain CSS — keep dependencies minimal.
- googleapis npm package for all Google APIs (one service account or one OAuth refresh token).
- Meta Graph API via plain fetch (no SDK).
- Local storage for all saved state: a single SQLite file (or JSON file) behind one src/lib/store.ts module, so it can be swapped for a hosted database later without touching anything else.
- Runs locally with npm run dev / npm start — no cloud account needed.
- Tests with Node's built-in test runner (node --test), no Jest.

## Hard constraints (design around these from day one)
1. Anything slow (site crawl, history snapshot) runs as a separate refresh job (npm run snapshot plus a "Refresh data" button), never on page load.
2. Every API connector must work independently. If one fails or has no credentials, that panel shows a clear "not connected" state — the rest of the dashboard still loads.
3. Never mix demo data with real data. If you add demo/sample data for development, it must be visibly labelled "DEMO" on screen and must never be written to stored history. Stored history must only ever come from real API responses.
4. Secrets only in environment variables. Never log tokens, never send them to the browser, never commit .env. Give me a .env.example with every variable name and a one-line comment.
5. Do not show a ROAS or revenue figure unless conversion values are actually being tracked. If the value is zero because of configuration, hide the tile and say why — a "0.00x ROAS" tile reads as total failure to a client.

## Security
- Login with a password per user (hashed with scrypt from Node's crypto), session as a signed HTTP-only cookie.
- Two roles: admin (agency) and client. Admins cannot approve on the client's behalf.
- Fail closed: in production, if SESSION_SECRET is missing, every route returns 503 — never fall back to "open".
- Rate-limit login attempts. Every write (approval, comment, plan tick) goes to an append-only audit log with user, time and what changed.

## Build in phases — stop after each phase, show me it running, and wait for my OK

### Phase 1 — Skeleton + auth
Next.js app, login page, session, roles, fail-closed check, a layout with tabs. Running locally. Write the setup steps into README.md.

### Phase 2 — Data connectors
One file per source in src/lib/ (gsc.ts, ga4.ts, gtm.ts, google-ads.ts, meta.ts), each exporting a function that returns typed data or a typed "not connected / error" result. Pull for a selectable date range (last 7 / 28 / 90 days, and month picker):
- Search Console: clicks, impressions, CTR, average position; top queries and top pages; biggest movers vs previous period.
- GA4: users, sessions, engagement rate, key events (leads/WhatsApp clicks/form submits), top landing pages, traffic by channel.
- Tag Manager: list live tags and flag paused or broken ones.
- Google Ads: per campaign — spend, clicks, CTR, avg CPC, conversions, cost per conversion.
- Meta Ads: per campaign — spend, reach, results (use the campaign's actual result type, e.g. leads vs messaging conversations — don't assume), cost per result.

### Phase 3 — Overview + Action Center
- Overview: one row of KPI tiles (with % change vs previous period) and a short "what changed this week" summary.
- Action Center: deterministic rules (not AI) that turn the data into a ranked to-do list, e.g. "page ranks 8-15 with high impressions -> improve title", "campaign spend up, conversions flat", "tag paused". Each item: what, why (the numbers), suggested fix, priority.
- A snapshot job (npm run snapshot, safe to run daily with Windows Task Scheduler or cron) stores a snapshot so trends work over time.

### Phase 4 — Monthly Ads Report
A tab that pulls every campaign's spend, start date and results for a chosen calendar month live from Meta + Google Ads. Totals per platform and combined. Export to CSV and a clean print/PDF view. Never show demo data here.

### Phase 5 — Plans & Updates
- Each month's plan lives in a TypeScript data file (src/data/plans.ts), newest first: tasks, owner, budget options.
- Client can tick tasks and choose a budget option; that state is saved in the store, not browser-only.
- An Updates timeline (src/data/work-log.ts) listing shipped work with dates, so the client sees progress without asking.

### Phase 6 — Approvals
- Every document waiting for client sign-off appears here (generated from my .docx files by a small script).
- Client can read it in the dashboard, download the Word file, upload a revised version (size-limited), comment, and choose Approve, Approve with small changes, or Request changes.
- Approvals are per document version — a new version resets the status. Each item can carry a "Questions for you" block the client answers inline.
- All actions go to the audit log.

### Phase 7 (optional) — AI assistant panel
A chat panel that answers questions about the data on screen. Pass it only the current dashboard numbers as context. Label its answers as "AI — verify before using". Never let it write anything.

### Phase 8 (optional) — Host it online
Only if I want the client to open it from anywhere. Ask me which host I prefer, then swap store.ts for a hosted database and move the snapshot job to the host's scheduler. Check the host's limits first (function timeouts, how often scheduled jobs can run) and move anything slow off the request path.

## Quality bar
- Mobile-friendly; works at 375px width.
- Every panel has loading, empty, error and "not connected" states.
- Plain-English labels with a one-line tooltip explaining each metric.
- Unit tests for every rule in the Action Center, the auth/role logic, the approval state machine and date-range maths.
- Before saying a phase is done: run npm run typecheck, npm test, npm run build, and open the app in the browser to confirm it works. Tell me exactly what you verified and what you didn't.

## What I'll provide when you ask
- Google Cloud project with Search Console, GA4 Data, Tag Manager and Google Ads APIs enabled + credentials
- Google Ads developer token and customer ID
- Meta system-user access token and ad account ID

Start with Phase 1. Ask me any blocking questions first, in one short list.

Common questions

Does it cost anything to run?The tools are free and it runs on your own computer. You only pay for your Claude plan. Hosting it online (Phase 8) may cost money depending on the host.
One panel says 'not connected'That source’s key is missing or wrong. The rest of the dashboard still works. Ask Claude to check that connector and tell you which variable in .env is the problem.
Can my client see it?Only if you host it online (Phase 8). Until then it runs on your computer only.
Where do I get a Google Ads developer token?In your Google Ads manager account, under API Center. Google reviews new tokens, so apply early.