Google Built Analytics For Data Scientists. I Made It Work For Marketers Like ME (And You Can)
Most CMOs can't use Google Analytics 4 without hiring specialists. This local AI system transforms GA4 into a conversational analyst you can query by voice—setup in 20 minutes.
Google Analytics 4 became something only data scientists understand.
I run a fitness chain of a couple of dozen clubs. All sales are done online only. We track 100,000+ monthly visitors. Our marketing team needs answers fast. Which Facebook campaigns convert? Where do blog readers go? What drives purchases?
GA4 has the data. However, obtaining answers requires specialized courses, certification programs, and hours spent navigating its interface. Most CMOs don’t have that time, and neither do I. Small businesses can’t afford dedicated analytics specialists. And you don’t need a person where AI excels.
The reality is: GA4 collects everything but explains nothing.
The Solution: Agentic Analytics DIY
I built a local system using Claude Code that transforms GA4 into a conversational interface. No dashboard hunting. No specialized training. Just questions and answers.
Here’s how it works:
The system runs locally – Claude creates scripts using it’s cloud LLM, but all scripts (stored locally) interact with your GA4 data directly and your resulting data stays on your machine. GA4 credentials authenticate once. Every question generates a new script optimized for that specific query. An agent can create an unlimited number of those scripts for any of your needs.
What you’ll need:
Google Analytics 4 Property ID
Google Cloud credentials (OAuth 2.0)
Claude Code installed locally
Python 3.9+
Step 1: Get GA4 Property ID Copy and Paste these prompts into Claude Code:
“Find my GA4 Property ID from Google Analytics admin panel.
Guide me step-by-step through: Admin → Property Settings → Property ID”
Step 2: Setup Google Cloud credentials
“Help me create OAuth 2.0 credentials for Google Analytics Data API.
I need:
1. Enable Google Analytics Data API v1beta
2. Create OAuth 2.0 Client ID
3. Download credentials.json
Store credentials in: ./scripts/secrets/”
Step 3: Install dependencies
“Create Python virtual environment and install:
- google-analytics-data
- google-auth
- google-auth-oauthlib
- python-dotenv
Save to: ./config/analytics_env/”
Step 4: Configure environment
“Create .env file with:
GA4_PROPERTY_ID=[your-property-id]
GOOGLE_APPLICATION_CREDENTIALS=[path-to-credentials.json]”
Step 5: Test connection
“Write a script to verify GA4 connection and show:
- Top 5 traffic sources (last 7 days)
- Total sessions
- Active users”
That’s it. System ready. Just try it by yourself. You wouldn't believe it's so simple!
5 Real Use Cases
1. Meta Ads Performance
Question: “Show me Facebook/Instagram ad conversions and sales last month”.
For the first example I’ll go with screenshots, next – believe me, it really does its magic all the time.
Result: 9,341 sessions, breakdown by campaign, conversion rates, and top performers identified.
Before: 2 hours building a custom report in GA4. After: 30 seconds, ask a question.
2. Content Performance
Question: “Top 10 most visited pages this week”.
Result: Ranked list with sessions, users, and time-on-page.
Insight: Club pages dominate (7 of the top 10).
3. Blog Navigation Analysis
Question: “Where do blog readers come from, which posts they read, and where do they go after?”
Result:
Entry: 60% Google organic, 25% Facebook.
Top 5 posts: [specific titles with sessions].
Exit: 35% to club pages, 45% leave site, 20% to pricing.
Action: Add CTA to club pages in popular posts.
4. Traffic Anomalies
Question: “Show monthly traffic trends for 2024, highlight unusual spikes.”
Result: Traffic visualization with annotations.
Correlation: Marketing campaigns, holidays, real-world events (war-related closures in Ukraine).
Value: Context for data interpretation.
5. Multi-Touch Attribution: Path to Purchase
Question: “Show average number of sessions before first purchase and top 3 channels in customer journey last quarter”
Result: Complete customer journey analysis, average touchpoints to conversion, channel contribution to purchase path
Before: 3+ hours setting up Exploration reports, configuring User Lifetime analysis, manual data interpretation
After: 55 seconds asking question
Limitations
There are some, of course. The world is not ideal ;)
24-48h data delay (GA4 API limit).
Custom dimensions need mapping.
Complex funnels = multiple queries.
Voice Mode: The Future
I now ask analytics questions while driving. Voice in → spoken answer. No screen needed. For voice input I recommend use Whispr Flow for Mac. For other systems – do your own research.
Manager calls: “Facebook campaign status?” 30 seconds: “4,500 sessions this week, conversion up 12%, top: campaign 1_uah”
Bottom line
GA4 became too complex for humans. Perfect for AI agents. The question isn’t whether to use agentic analytics - it’s how fast you’ll set it up.
What’s your biggest analytics pain point?








Your agentic analytics approach exposes a real problem with how Google builds enterprise products. GA4 was designed for specialists, not the business owners who need the insights. The irony is that Google spent billions on AI development but shipped an analytics platform that requires another AI to make it useable. Your voice mode solution is brillant because it finally delivers on the promise of accessible data. This shows how a clever implementation layer can rescue a powerful but overcomplicated Google product.