AgentKit
DocsKitsCLI ReferenceDesktop App

Skills

Measure marketing performance with ak:analytics

Turn approved marketing data into a KPI, attribution, experiment, funnel, or recurring performance report without treating estimates as facts.

Use ak:analytics to define measures, analyze approved data, and produce an evidence-backed marketing report. The workflow covers campaign, KPI, attribution, A/B test, funnel, cohort, and recurring-report analysis. It can work from supplied exports or use the packaged GA4 helpers when dependencies, credentials, property access, and current provider behavior are available.

Choose ak:analytics for a defined measurement question

Use ak:analytics when

  • You need a campaign, funnel, cohort, experiment, attribution, or KPI review.
  • You have a reporting period, metric definitions, goals, and usable source data.
  • You want findings separated from assumptions and recommendations prioritized.
  • You need a report with tables, Mermaid charts, owners, and next steps.

Choose another workflow when

  • You only need the broad Marketing dispatcher or a periodic cross-channel summary. Use ak:analyze and select an analysis type or report period.
  • You want to browse local brand and asset files. Use ak:marketing-dashboard.
  • Tracking events or account configuration must be implemented. First define a tracking specification; treat every code or GA Admin change as a separate, reviewed mutation.
  • You do not yet have reliable data. The Skill can define a collection plan, but it cannot reconstruct missing events or prove historical attribution.

Prepare data, definitions, and access

Before you start, provide the business question, date range, timezone, currency, conversion definition, comparison period, and approved goals. Name each source and any known gaps. Supported workflow inputs include GA4, advertising exports, CRM data, email metrics, and project files; availability is not a connector guarantee.

Use aggregated data where possible. Property, account, campaign, UTM, transaction, geography, device, and user dimensions can identify an account or person when combined. Exclude secrets and unnecessary personal data, document redaction or sampling, and do not copy raw credentials into a prompt or report.

RuntimeInvocationAvailability boundary
Claude Code/ak:analytics ...Native or explicit plugin delivery can expose the packaged Skill and its files. External data still requires local dependencies and authorized credentials.
Cursor/ak:analytics ...Slash invocation is user-verified. It does not establish connector, Hook, or provider parity.
Codex$ak:analytics ...Native Skill discovery is supported. External tools and Marketing Hooks remain capability-specific.

See Runtime adapters for delivery and component differences.

Run the Skill

/ak:analytics "Analyze the approved Q2 campaign export. Compare spend, clicks, conversions, revenue, CVR, CPL, CAC, and ROAS with the approved goals. Use no personal data, label missing fields, and produce recommendations only"

For GA4 reporting, the packaged helper accepts exact inputs such as --property=PROPERTY_ID, --start=DATE, --end=DATE, --dimensions=LIST, --metrics=LIST, --limit=N, --realtime, and --json. Run it only from the resolved installed Skill directory:

node scripts/ga-run-report.cjs --property=PROPERTY_ID --start=7daysAgo --end=today --dimensions=country --metrics=activeUsers,sessions --limit=100 --json

The helper requires @google-analytics/data; account discovery also uses @google-analytics/admin and googleapis. Credentials can come from GOOGLE_APPLICATION_CREDENTIALS or project/user .claude/secrets/ files named ga_service_account.json, google_client_secret.json, and ga_token.json. The OAuth setup helper requests both analytics.readonly and analytics.edit. For reporting-only work, prefer the least privilege your organization supports.

Understand the analysis stages

  1. Confirm the question. Define the decision, KPI formulas, success goals, dates, segments, and acceptable evidence.
  2. Inventory sources. Record provenance, permissions, identifiers, missing fields, sampling, and inconsistent definitions before combining data.
  3. Calculate comparable measures. Align timeframes and compute the selected ratios. Treat packaged benchmark ranges as prompts for validation, not facts about your market.
  4. Test interpretations. Check sample size and uncertainty for experiments, compare attribution models when useful, and keep attribution distinct from causation.
  5. Report findings. Separate observed results, anomalies, limitations, and hypotheses; then prioritize bounded next steps with owners.

Keep approval and account changes separate

Analysis does not authorize instrumentation or spend

A report may recommend changing events, GA4 properties, campaigns, budgets, audiences, or experiments. Those are separate mutations with account, provider, privacy, cost, and publication effects. Review and authorize them individually; a reporting request grants read and analysis scope only.

Do not expose credentials, raw customer identifiers, or small segments in the report. Verify consent, retention, and sharing rules before using cross-device, demographic, CRM, or offline data. A provider result can be sampled, delayed, quota-limited, or redefined; preserve those qualifications.

Verify outputs and evidence

The Skill's analytics template writes to assets/reports/analytics/{date}-{report-type}.md. A useful result includes source provenance, period and filters, formulas, goal comparison, charts or tables, findings, limitations, prioritized recommendations, and owners. Verify totals against the source, reconcile currency and timezone, and rerun critical calculations independently before acting.

Troubleshoot and know the limits

SymptomSafe next step
No data or access deniedConfirm the property ID, credential location, account grant, and reporting scope. Do not broaden permissions without approval.
Invalid dimension or metricUse current GA4 metadata or compatibility checks; do not silently substitute a different measure.
Quota or provider failurePreserve the partial period and error, then retry with a bounded query or later window.
Sources disagreeReconcile definitions, timezone, attribution window, deduplication, and currency before combining them.
The result looks causalReword it as an association or hypothesis unless the study design supports causality.
Runtime cannot find the SkillFollow Runtime cannot find a Skill or Agent.

The Skill does not guarantee data completeness, statistical power, attribution truth, performance improvement, revenue, or ROI. Continue with the Marketing Kit overview or use Installing kits for discovery and lifecycle guidance.