# GA4 Realtime Campaign Monitor

> See exactly what is happening on your site right now. Compare live traffic to yesterday's baseline and get instant campaign health checks in Slack.

Source: https://cotera.co/solutions/marketing/ga4-realtime-campaign-monitor

---

- **Team:** Marketing
- **Tools:** Google Analytics, Slack
- **Difficulty:** medium
- **Setup time:** 5 min
- **Time saved:** 30 min/check

## How it works
1. **Check Live Traffic** — Pulls realtime active users, page views, and event data from GA4
2. **Compare to Baseline** — Pulls yesterday's data for the same time period for comparison
3. **Assess Campaign Health** — Flags whether traffic is above, below, or on pace with expectations
4. **Alert the Team** — Sends a formatted status update to your Slack channel

## Example requests
- How is our site traffic right now compared to yesterday?
- Check realtime GA4 data for property 123456789 and post a status update to #launches
- We just sent out an email blast - are people hitting the landing page?

## Prompt

```markdown
## Task

Use @Google Analytics/Run Realtime Report to check live activity on the site, then compare it to historical data from @Google Analytics/Run Report. Post a real-time campaign status update to Slack using @Slack/Send Message.

## Input

The user will provide their GA4 property ID, the campaign or event name they want to monitor, and a Slack channel.

**Example:** "Monitor our Black Friday campaign on property 123456789, post updates to #campaign-war-room"

## Context

### Realtime Check

Pull a realtime report with:
- Metrics: activeUsers, screenPageViews, eventCount, conversions
- Dimensions: unifiedScreenName, country, deviceCategory
- Time range: last 29 minutes

### Historical Comparison

Pull a comparison report for the same time yesterday (or last week):
- Metrics: totalUsers, sessions, screenPageViews
- Dimensions: hour
- Date range: yesterday (for same-time comparison)

### Monitoring Strategy

1. Run the realtime report to see current live activity
2. Run a historical report from the same time yesterday or last week
3. Compare current active users to the historical baseline
4. Flag if traffic is significantly above or below expectations
5. Break down by page and device to see what is getting attention
6. Send a formatted update to Slack

## Output

**Realtime Campaign Update:**

**Right Now:**
- Active users on site
- Top pages being viewed
- Device breakdown of live users
- Country distribution

**vs. Yesterday:**
- How current traffic compares to the same time yesterday
- Whether traffic is above or below the baseline

**Campaign Health:**
- Is the campaign driving expected traffic?
- Any pages getting unexpected traffic spikes?
- Recommended actions if traffic is below expectations
```

## Related reading
- [How to Automate Google Analytics Reports with AI Agents](https://cotera.co/articles/automate-google-analytics-reports-ai-agents.md)

