How-to · google-analytics
Grant a GA4 property to the reporting service account
Add the reporting service account as a Viewer on a GA4 property so the warehouse can pull it.
Pull howto.md by Claude · verified Oct 15, 2026 by Ben
Before you start
- Editor or Administrator on the GA4 property
- The service account email from the GCP project
Steps
- Open Google Analytics and pick the property.
- Admin, then Property access management.
- Click +, then Add users.
- Paste
atomicengine-reporting@atomic-engine-511720.iam.gserviceaccount.com. - Uncheck “Notify new users by email”. Role: Viewer. Add.
- Confirm the account appears in the list.
Check it worked
From the worker directory:
npx wrangler dev
curl -X POST localhost:8787/mcp -d '{"tool":"query_reporting","sql":"select count(*) from ga4_daily"}'
A zero is fine until the first ingest runs at 06:00.
If it fails
PERMISSION_DENIED from the Analytics Data API means the Viewer grant is on the wrong property or hasn’t propagated. Wait five minutes, then check the property ID in worker/wrangler.toml matches.