
Automate Weekly Client Reporting With Google Sheets and Scheduled PDFs
A consultant-safe workflow for turning recurring Google Sheets data into reviewed weekly PDF reports with scheduled email delivery.
Your organic traffic dropped 40% last Tuesday. You found out on Friday. By then, the broken redirect had been live for three days, costing you hundreds of conversions. Sound familiar?
The most common real workflow is even more urgent: someone asks what changed right before a meeting. You need to pull GA4, Search Console, ads, or revenue data together quickly, find the likely driver, and walk in with a chart or report you can defend.
GA4 has built-in anomaly detection, but it's passive — it waits for you to check. And it only flags what it considers statistically significant, often missing the signals that matter most to your business. This guide covers how GA4's native anomaly detection works, where it falls short, and how to build a workflow that helps you catch problems, investigate them, and explain them when stakeholders ask.
Quick answer
If you need an answer before a marketing review, use an AI data analysis workspace like Anomaly AI to combine GA4 with Search Console, ads, revenue, CSV, or spreadsheet data, ask what changed, inspect the logic, and turn the answer into a chart, report, or dashboard. Use GA4 Custom Insights for simple threshold alerts and BigQuery when you need statistical anomaly rules.
Anomaly detection identifies data points that deviate significantly from expected patterns. In the context of Google Analytics, that means flagging when:
The challenge: not every fluctuation is an anomaly. Traffic varies naturally by day of week, season, and campaign schedules. Good anomaly detection separates real problems from normal noise.
| Situation | Best first tool | What to check | Where Anomaly AI helps |
|---|---|---|---|
| Meeting in 20 minutes and someone asks what changed | Anomaly AI + GA4/Search Console export | Top moving pages, channels, campaigns, countries, devices, conversions | Pull the answer into a chart, dashboard, report, or stakeholder summary |
| Traffic dropped yesterday | GA4 Custom Insight | Source, landing page, device, country, tracking status | Build a diagnosis dashboard and ask follow-up questions across segments |
| Organic traffic dropped but paid stayed flat | GA4 + Search Console | Queries, pages, impressions, CTR, rankings, redirects | Combine GA4 and Search Console exports into one investigation |
| You need repeatable anomaly rules | GA4 BigQuery export | Z-scores, rolling averages, page-level baselines | Turn the query output into dashboards, Excel reports, PDFs, or scheduled reviews |
| Leadership needs a weekly risk report | Dashboard + scheduled report | Traffic, conversions, revenue, top movers, unresolved drops | Create a reusable reporting workflow with reviewable logic |
GA4 includes anomaly detection out of the box through two features: Automated Insights and Custom Insights.
GA4 uses machine learning to automatically detect unusual changes in your data. You'll find these on the Home screen and in the Insights card.
What GA4 automatically detects:
GA4 builds a statistical model of your historical data (typically the previous 90 days). When a new data point falls outside the expected range, it triggers an insight. The model accounts for:
Custom insights let you define your own anomaly rules with email notifications — the closest thing to "alerts" in GA4.
| Alert Name | Metric | Condition | Why It Matters |
|---|---|---|---|
| Traffic crash | Active users | Decreases >30% (daily) | Catch tracking breaks, server outages, ranking drops |
| Conversion drop | Key events | Decreases >25% (daily) | Broken forms, checkout issues, CTA problems |
| Bot traffic spike | Active users | Increases >100% (daily) | Referral spam, bot attacks, inflated metrics |
| Mobile engagement crash | Engagement rate (mobile segment) | Decreases >20% (daily) | Responsive design breaks, slow mobile load times |
| Revenue anomaly | Total revenue | Decreases >20% (daily) | Pricing errors, payment gateway issues, cart abandonment spike |
For teams that need more sophisticated detection, GA4's BigQuery export opens up statistical methods that go far beyond simple threshold alerts.
Z-scores measure how many standard deviations a data point is from the mean. A score above 2 or below -2 typically indicates an anomaly.
WITH daily_sessions AS (
SELECT
PARSE_DATE('%Y%m%d', event_date) AS date,
COUNT(DISTINCT
CONCAT(user_pseudo_id, '-',
(SELECT value.int_value FROM UNNEST(event_params)
WHERE key = 'ga_session_id'))
) AS sessions
FROM `your-project.analytics_PROPERTY_ID.events_*`
WHERE _TABLE_SUFFIX BETWEEN
FORMAT_DATE('%Y%m%d', DATE_SUB(CURRENT_DATE(), INTERVAL 90 DAY))
AND FORMAT_DATE('%Y%m%d', CURRENT_DATE())
GROUP BY date
),
stats AS (
SELECT
AVG(sessions) AS mean_sessions,
STDDEV(sessions) AS stddev_sessions
FROM daily_sessions
)
SELECT
d.date,
d.sessions,
ROUND((d.sessions - s.mean_sessions) / NULLIF(s.stddev_sessions, 0), 2) AS z_score,
CASE
WHEN (d.sessions - s.mean_sessions) / NULLIF(s.stddev_sessions, 0) > 2 THEN 'SPIKE'
WHEN (d.sessions - s.mean_sessions) / NULLIF(s.stddev_sessions, 0) < -2 THEN 'DROP'
ELSE 'NORMAL'
END AS status
FROM daily_sessions d
CROSS JOIN stats s
ORDER BY d.date DESC
LIMIT 30
Compare each day's traffic to a rolling 7-day average. This handles weekly seasonality better than a flat mean.
WITH daily_sessions AS (
SELECT
PARSE_DATE('%Y%m%d', event_date) AS date,
COUNT(DISTINCT
CONCAT(user_pseudo_id, '-',
(SELECT value.int_value FROM UNNEST(event_params)
WHERE key = 'ga_session_id'))
) AS sessions
FROM `your-project.analytics_PROPERTY_ID.events_*`
WHERE _TABLE_SUFFIX BETWEEN
FORMAT_DATE('%Y%m%d', DATE_SUB(CURRENT_DATE(), INTERVAL 90 DAY))
AND FORMAT_DATE('%Y%m%d', CURRENT_DATE())
GROUP BY date
)
SELECT
date,
sessions,
ROUND(AVG(sessions) OVER (
ORDER BY date
ROWS BETWEEN 7 PRECEDING AND 1 PRECEDING
), 0) AS rolling_7d_avg,
ROUND(
(sessions - AVG(sessions) OVER (
ORDER BY date ROWS BETWEEN 7 PRECEDING AND 1 PRECEDING
)) / NULLIF(AVG(sessions) OVER (
ORDER BY date ROWS BETWEEN 7 PRECEDING AND 1 PRECEDING
), 0) * 100, 1
) AS pct_deviation
FROM daily_sessions
ORDER BY date DESC
LIMIT 30
Flag days where pct_deviation exceeds ±25% as anomalies worth investigating.
Site-wide metrics can mask page-specific problems. This query detects pages where traffic dropped significantly compared to their own baseline.
WITH page_daily AS (
SELECT
(SELECT value.string_value FROM UNNEST(event_params)
WHERE key = 'page_location') AS page,
PARSE_DATE('%Y%m%d', event_date) AS date,
COUNT(*) AS pageviews
FROM `your-project.analytics_PROPERTY_ID.events_*`
WHERE event_name = 'page_view'
AND _TABLE_SUFFIX BETWEEN
FORMAT_DATE('%Y%m%d', DATE_SUB(CURRENT_DATE(), INTERVAL 14 DAY))
AND FORMAT_DATE('%Y%m%d', CURRENT_DATE())
GROUP BY page, date
),
page_stats AS (
SELECT
page,
AVG(pageviews) AS avg_daily_views,
STDDEV(pageviews) AS stddev_views
FROM page_daily
WHERE date < DATE_SUB(CURRENT_DATE(), INTERVAL 1 DAY)
GROUP BY page
HAVING AVG(pageviews) > 10
)
SELECT
d.page,
d.date,
d.pageviews,
ROUND(s.avg_daily_views, 0) AS expected,
ROUND((d.pageviews - s.avg_daily_views) /
NULLIF(s.stddev_views, 0), 2) AS z_score
FROM page_daily d
JOIN page_stats s ON d.page = s.page
WHERE d.date = DATE_SUB(CURRENT_DATE(), INTERVAL 1 DAY)
AND (d.pageviews - s.avg_daily_views) /
NULLIF(s.stddev_views, 0) < -2
ORDER BY s.avg_daily_views DESC
To turn these queries into automated alerts:
This works well but requires ongoing maintenance. For a simpler approach, consider the AI-powered option below.
The gap between GA4's basic alerts and BigQuery's statistical methods is where most teams get stuck. GA4 can tell you a metric changed. BigQuery can help you define stronger statistical rules. The harder job is usually the investigation: which pages, channels, devices, countries, campaigns, or tracking changes explain the anomaly?
Anomaly AI is not a replacement for GA4's own anomaly alerts or a dedicated statistical monitoring engine. It is the analysis workspace you use when a marketing review is coming up, someone asks what changed, and you need to turn the investigation into a dashboard, report, or recurring review.
Here's what it does differently:
Likely causes:
First check: Look at Realtime reports — if they show 0 users, it's a tracking issue, not a traffic issue.
Likely causes:
Likely causes:
Likely causes:
First check: Look at engagement rate and session duration. Bot traffic typically has near-0% engagement and sub-1-second sessions.
Likely causes:
When you spot an anomaly, follow this sequence to find the root cause fast:
Yes. GA4 includes automated insights powered by machine learning (on the Home screen) and custom insights that let you set threshold-based alerts with email notifications. However, they're limited to simple conditions and don't provide root cause analysis.
Start conservative: 25-30% change thresholds for traffic, 20-25% for conversions. If you get too many false positives, increase the threshold. If you're missing real issues, lower it. The right sensitivity depends on your traffic volume — high-traffic sites can use tighter thresholds because their data is less noisy.
GA4's Realtime report shows the last 30 minutes but doesn't have real-time anomaly detection. For near-real-time anomaly detection, use BigQuery streaming export plus a monitoring system built for live alerts. For recurring business reviews, use GA4 exports, dashboards, and scheduled reports so traffic drops are checked consistently.
Google Analytics Intelligence was the Universal Analytics feature that answered natural language questions and provided automated insights. In GA4, this evolved into the Insights feature (automated + custom). The core concept is the same, but GA4's version uses newer ML models and integrates with GA4's event-based data model.
GA4's native insights work per-property only. For cross-property monitoring, export all properties to BigQuery (they can share a dataset) and run anomaly detection SQL across them. Or use an AI analytics platform that can connect multiple GA4 properties.
Here's the minimum viable monitoring setup that catches 90% of issues:
Related guides:
Ready to stop turning every GA4 drop into a spreadsheet fire drill? Get started with Anomaly AI — connect GA4 or upload your exports, investigate what changed, and turn the answer into a dashboard, report, or scheduled review.
Experience AI-driven data analysis with your own spreadsheets and datasets. Generate insights and dashboards in minutes with our AI data analyst.
Founder, Anomaly AI (ex-CTO & Head of Engineering)
Abhinav Pandey is the founder of Anomaly AI, an AI data analysis platform built for large, messy datasets. Before Anomaly, he led engineering teams as CTO and Head of Engineering.
Continue exploring AI data analysis with these related insights and guides.

A consultant-safe workflow for turning recurring Google Sheets data into reviewed weekly PDF reports with scheduled email delivery.

Query raw GA4 BigQuery export data without hand-writing SQL, while keeping generated logic visible enough to validate, reuse, and report.

Understand the GA4 BigQuery schema, avoid export pitfalls, run practical SQL examples, and turn raw GA4 events into marketing reports and answers.