Create workspace for building Google Analytics Claude Skill with: - 5 independent components (MCP setup, skill, dimension explorer, Slack reporter, realtime watcher) - Comprehensive project plan and documentation - Step-by-step setup guides for each component Components: 1. MCP Setup - GA4 + BigQuery MCP server installation 2. GA Agent Skill - Core Claude Skill for interactive analysis 3. Dimension Explorer - Validate dims/metrics with explanations 4. Slack Reporter - Automated reports to Slack (P2) 5. Realtime Watcher - Real-time monitoring (deferred) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Component 5: Realtime Watcher
Type: Standalone Service Priority: P3 Status: Deferred
Goal
Real-time GA4 monitoring with periodic snapshots to Slack.
Status
Deferred — Complete components 1-4 first.
Original Concept
- Screenshot GA4 real-time dashboard every 5 minutes
- Send screenshots to Slack channel
- Trigger via Slack command or user request
Challenges
| Challenge | Issue |
|---|---|
| Browser auth | GA4 requires Google login |
| Maintenance | Screenshots break when UI changes |
| Complexity | Headless browser + auth + scheduling |
| Value | Screenshots may not be best UX |
Simplified Approach (Recommended)
Instead of screenshots, use the GA4 Real-time API:
- Fetch real-time data via API
- Generate chart image with Plotly
- Send image to Slack
Benefits
- No browser automation
- More reliable
- Cleaner output
- Programmatic data access
Structure (Future)
05-realtime-watcher/
├── README.md
├── realtime_api.py # GA4 Real-time API client
├── chart_generator.py # Generate chart images
├── slack_sender.py # Upload to Slack
├── watcher.py # Main service
├── config.yaml
└── requirements.txt
GA4 Real-time API
from google.analytics.data_v1beta import BetaAnalyticsDataClient
from google.analytics.data_v1beta.types import RunRealtimeReportRequest
def get_realtime_users(property_id: str):
client = BetaAnalyticsDataClient()
request = RunRealtimeReportRequest(
property=f"properties/{property_id}",
dimensions=[{"name": "unifiedScreenName"}],
metrics=[{"name": "activeUsers"}]
)
response = client.run_realtime_report(request)
return response
Trigger Options
- Slack Command:
/ga-realtime start - Scheduled: During campaign launches
- API Endpoint: Webhook trigger
Implementation (When Ready)
- Build real-time API client
- Create chart generator
- Add Slack integration
- Implement start/stop controls
- Add session timeout (1 hour default)
Checklist (Future)
- Real-time API client
- Chart generation
- Slack integration
- Trigger mechanism
- Session management
- Deployment