🧠 HeyCMO
Workflows

Analytics Report

Cross-channel performance analysis with anomaly detection and actionable recommendations.

Analytics Report Workflow

The Analytics Report workflow generates cross-channel performance analysis with anomaly detection, trend identification, and actionable recommendations.

Input Schema

{
  period: 'last_7_days' | 'last_30_days';  // Default: 'last_7_days'
}

Pipeline Steps

Step 1: Fetch GA4 Data

Pulls Google Analytics data via Composio:

  • Sessions, users, pageviews
  • Bounce rate, session duration
  • Conversion events and goals
  • Traffic source breakdown
  • Top landing pages

Step 2: Fetch Search Console Data

Pulls Google Search Console data:

  • Impressions, clicks, CTR
  • Average position by query
  • Keyword ranking changes
  • Top pages by clicks

Step 3: Fetch Social Metrics

Pulls engagement data from connected social platforms:

  • Instagram: reach, impressions, engagement rate, saves, shares
  • LinkedIn: post views, engagement, follower growth
  • X: impressions, engagement, link clicks
  • Facebook: reach, engagement, page likes

Step 4: Fetch Email Metrics

Pulls email performance from Resend:

  • Open rate, click rate
  • Unsubscribe rate
  • List growth
  • Best-performing campaigns

Step 5: Analyze & Correlate

The Analyst agent processes all data and produces:

{
  report: string;                    // Full narrative report
  channelMetrics: Array<{
    channel: string;
    metrics: Record<string, unknown>;
    summary: string;
  }>;
  insights: Array<{
    insight: string;
    severity: 'positive' | 'negative' | 'neutral';
    actionable: boolean;
  }>;
  recommendations: string[];
  adjustedWeights: Array<{
    category: string;
    key: string;
    previousValue: number;
    proposedValue: number;
    rationale: string;
  }>;
  period: string;
}

Step 6: Weight Adjustments

Based on performance patterns, the workflow proposes adjustments to content scoring weights. For example, if carousels consistently outperform static images, the carousel weight increases.

Output

The final report includes:

  1. Executive Summary — Single most important insight + trend direction
  2. Channel Breakdown — Metrics per channel with summaries
  3. Cross-Channel Insights — Correlations and patterns across channels
  4. Anomalies — Metrics deviating >20% from 4-week average with root causes
  5. Recommendations — Prioritized action items
  6. Weight Adjustments — Proposed changes to content scoring

Scheduling

Runs weekly via Inngest cron. The last_7_days period is used for weekly reports; last_30_days for monthly reviews.

On this page