analytics-insights
Analyze marketing performance. Use when: KPI frameworks, attribution modeling, anomaly investigation, measurement strategy.
git clone --depth 1 https://github.com/indranilbanerjee/digital-marketing-pro /tmp/analytics-insights && cp -r /tmp/analytics-insights/skills/analytics-insights ~/.claude/skills/analytics-insightsSKILL.md
# Analytics & Insights
## GA4 "AI Assistant" channel group (added 13 May 2026)
Google Analytics 4 added a new **default channel group called "AI Assistant"** on 13 May 2026 ([GA4 channel groups doc](https://support.google.com/analytics/answer/9164320?hl=en)). When a referrer matches a recognized AI Assistant (ChatGPT, Gemini, Claude, etc.), GA4 automatically:
- Categorizes the session under the **AI Assistant channel group**
- Sets the **Medium dimension to `ai-assistant`**
This is the **attribution-side counterpart** to the new GSC AI Performance Report (rolled out 3 June 2026 — see `/digital-marketing-pro:gsc-ai-performance`). Because the GSC AI report intentionally excludes click data, the GA4 AI Assistant channel is currently the cleanest path to attribute *actual traffic* coming from generative AI surfaces.
**Recommended GA4 setup checks** when onboarding a brand:
1. **Confirm the channel group is live in the property.** Newer GA4 properties get it automatically; older ones may need it to appear after Google's backfill completes. If the brand reports their channel reports look unchanged after 13 May, check explore reports filtered by `sessionDefaultChannelGroup = "AI Assistant"`.
2. **Add the AI Assistant channel to custom reports + dashboards** — for any brand running an AEO program (`/digital-marketing-pro:aeo-geo`, `/digital-marketing-pro:aeo-audit`), the AI Assistant channel trend is now a primary KPI alongside organic search clicks.
3. **Don't merge AI Assistant into "Organic Search" or "Direct".** Some legacy reporting templates roll AI traffic into Direct (because referrers weren't always present) or Organic Search (because answer engines feel "search-like"). Both are misattributions now — the AI Assistant channel is the authoritative bucket.
4. **Reconcile with `aeo-audit` outputs and the GSC AI report.** Three data sources, three different views:
- `aeo-audit` (synthetic probing) — what AI engines *could* say about the brand
- GSC AI Performance Report — actual impressions in Google AI Overviews / AI Mode (no clicks)
- GA4 AI Assistant channel — actual *traffic* from AI assistants (clicks materialized)
A healthy AEO program shows growth across all three; divergence between them is a diagnostic signal.
## When to Use This Skill
Activate this module when the user's request involves any of the following:
- **KPI Frameworks**: Defining the right metrics and success measures for a business model, campaign, or channel
- **Performance Reporting**: Building weekly, monthly, quarterly, or campaign-specific reporting templates
- **Anomaly Investigation**: Diagnosing sudden drops or spikes in traffic, conversions, or other metrics
- **Competitive Intelligence**: Analyzing competitor strategies, share of voice, positioning, and performance
- **Attribution Modeling**: Determining how credit for conversions is assigned across marketing touchpoints
- **Marketing Mix Modeling (MMM)**: Estimating the impact of each marketing channel on overall business outcomes
- **Incrementality Testing**: Designing experiments to measure the true causal impact of marketing activities
- **Dark Social Measurement**: Tracking and attributing traffic from private sharing channels (DMs, Slack, email forwards)
- **Privacy-First Measurement**: Adapting measurement strategies for a cookieless, privacy-regulated environment
- **Dashboard Design**: Structuring dashboards for different stakeholder audiences
**Trigger phrases**: "KPIs," "metrics," "reporting," "dashboard," "why did traffic drop," "anomaly," "competitor analysis," "competitive intelligence," "attribution," "marketing mix model," "MMM," "incrementality," "lift test," "dark social," "cookieless," "privacy-first," "ROAS," "ROI," "performance," "what happened to our numbers"
## Brand Context (Auto-Applied)
Before producing any marketing output from this module:
1. **Check session context** — The active brand summary was output at session start. Use the brand name, industry, voice settings, channels, goals, compliance, and competitors shown there.
2. **If you need the full profile**, read: `~/.claude-marketing/brands/{slug}/profile.json`
3. **Apply brand voice** — Formality, energy, humor, authority levels must shape all content tone and word choices
4. **Check compliance** — Auto-apply rules for brand's target_markets and industry using `skills/context-engine/compliance-rules.md`
5. **Reference industry benchmarks** — Consult `skills/context-engine/industry-profiles.md` for the brand's industry
6. **Use platform specs** — Reference `skills/context-engine/platform-specs.md` for character limits and format requirements
7. **Check campaign history** — Run `python campaign-tracker.py --brand {slug} --action list-campaigns` before planning new work
8. **If no brand exists**, say: "No brand profile found. Use /digital-marketing-pro:brand-setup to create one, or I can proceed with general best practices."
9. **Check brand guidelines** — If `~/.claude-marketing/brands/{slug}/guidelines/_manifest.json` exists, load and enforce: `restrictions.md` for banned words, restricted claims, and mandatory disclaimers; `channel-styles.md` for channel-specific tone overrides (may differ from base voice); `messaging.md` for approved key messages, taglines, and positioning language; `voice-and-tone.md` for detailed voice rules beyond the 4 numeric scores. If producing content for a specific channel, channel style rules take precedence over base voice settings.
Do not ask the user for information that already exists in their brand profile.
## Required Context
Before executing analytics work, gather:
1. **Business Model**: SaaS, e-commerce, lead gen, marketplace, etc. (determines the KPI framework)
2. **Business Maturity**: Startup, growth, scale-up, or enterprise (determines measurement sophistication)
3. **Current Metrics**: What is already being tracked? What tools are in use?
4. **Analytics Stack**: Google Analytics (UA/GA4), ad platforms, CRM,Invoke when the user needs to manage multiple client brands, view portfolio-level dashboards, generate client reports, manage SOPs, switch credential profiles, assign team tasks, configure regions, or generate executive summaries. Triggers on requests involving multi-client management, agency workflows, client onboarding, or portfolio oversight.
Invoke when the user needs help with marketing measurement, KPI definition, dashboard design, attribution modeling, performance analysis, anomaly detection, competitive benchmarking, or translating data into marketing decisions. Triggers on requests involving metrics, reporting, analytics setup, or data interpretation.
Invoke when marketing content needs quality control review — brand voice consistency checks, regulatory compliance verification (GDPR, CAN-SPAM, CCPA, HIPAA, FTC, industry-specific), accessibility auditing (WCAG 2.1), inclusive language review, or brand safety assessment. Automatically invoked as a final review step before any content is published or delivered.
Invoke when the user needs competitor analysis — content strategy teardowns, SEO gap analysis, paid ad analysis from ad libraries, social media benchmarking, AI visibility comparisons, pricing and positioning research, or market landscape mapping. Triggers on requests mentioning competitors, competitive gaps, market analysis, or benchmarking.
Use when the task requires ongoing competitive monitoring, competitor change detection, share of voice tracking, competitive alerts, ad monitoring, price monitoring, win/loss analysis, or competitive narrative mapping.
Invoke when the user needs any form of marketing content created or refined — blog posts, ad copy, email campaigns, social media posts, landing page copy, press releases, video scripts, product descriptions, or newsletter content. Triggers on requests to write, draft, rewrite, or improve marketing copy.
Invoke when the user needs to manage CRM operations — creating contacts, importing leads, updating deals, syncing campaign data, segmenting audiences, managing pipelines, or connecting marketing data to Salesforce, HubSpot, Zoho, or Pipedrive. Triggers on requests involving CRM data, lead management, pipeline updates, or sales-marketing alignment.
Invoke when the user needs help with conversion rate optimization — landing page audits, A/B test design, form optimization, pricing page strategy, checkout flow improvement, personalization, statistical significance calculations, page speed impact analysis, or mobile conversion optimization. Triggers on requests involving conversions, landing pages, A/B testing, or optimization experiments.