# GA4 Realtime Site Monitor

> See who is on your site right now, what they are looking at, and where they came from. Spot anomalies before they become problems.

Source: https://cotera.co/solutions/ops/ga4-realtime-site-monitor

---

- **Team:** Operations
- **Tools:** Google Analytics
- **Difficulty:** easy
- **Setup time:** 5 min
- **Time saved:** 15 min/check

## How it works
1. **Snapshot Active Users** — Pulls the current active user count and what pages they are viewing
2. **Map Traffic Sources** — Shows where live visitors are coming from right now
3. **Break Down Devices & Geo** — Splits traffic by device type and country for the live audience
4. **Flag Anomalies** — Calls out unusual traffic patterns, spikes, or geographic outliers

## Example requests
- How many people are on our site right now and what are they looking at?
- Check realtime traffic for property 123456789 — we just pushed a deploy
- Is anyone hitting the new landing page? Pull realtime data and tell me what you see

## Prompt

```markdown
## Task

Use @Google Analytics/List Properties to find the right GA4 property, then use @Google Analytics/Run Realtime Report to pull a snapshot of live site activity. Flag anything unusual compared to typical patterns.

## Input

The user will provide:
1. Their GA4 property ID (or ask to list properties first)
2. What they want to monitor (optional, e.g., a specific page or campaign)

**Example:** "What's happening on our site right now? Property ID: 123456789"

## Context

### Realtime Metrics to Pull

Run a realtime report with:
- Metrics: activeUsers, screenPageViews, eventCount, conversions
- Dimensions: unifiedScreenName (top active pages)
- Dimensions: sessionSource (live traffic sources)
- Dimensions: deviceCategory (device breakdown)
- Dimensions: country (geographic distribution)

### Monitoring Strategy

1. List properties if the user hasn't provided a property ID
2. Run a realtime report with activeUsers and page dimensions
3. Run a realtime report with source dimensions to see where traffic is coming from
4. Run a realtime report with device and country dimensions
5. Summarize what is happening right now on the site
6. Flag anything that looks unusual — spikes in a single page, unexpected traffic sources, or geographic anomalies

### What to Flag

- Any single page with a disproportionate share of active users
- Traffic from unexpected countries or sources
- Very high or very low active user counts relative to what the user describes as normal
- Unusual device splits (e.g., 90% mobile when the site is typically desktop-heavy)

## Output

**Live Site Snapshot:**

**Active Users:**
- Total active users right now
- Trend over last 30 minutes if available

**Top Active Pages:**
- Top 5 pages by active users
- Any pages with unusual traffic concentration

**Traffic Sources:**
- Where live visitors are coming from
- Top 3-5 sources driving current sessions

**Device & Geo Breakdown:**
- Desktop vs mobile vs tablet split
- Top countries by active users

**Flags & Observations:**
- Anything unusual or noteworthy about current activity
- Recommendations if spikes or drops are detected
```

## Related reading
- [GA4 Anomaly Detection Missed Our Traffic Drop. An Agent Got It.](https://cotera.co/articles/google-analytics-automation-tools-comparison.md)

