Google Analytics 4 → HookGet
HookGet reads Google Analytics 4's reporting API on a schedule and turns it into normalised events on the same pipeline as everything else you deliver.
In short
- Reads the GA4 Data API (
runReport) with a service account — grant it viewer access on the property and paste its JSON key. No OAuth dance. - One event per settled day:
web.traffic_reportedwithactive_users,sessions,screen_page_views— or up to 8 metrics you choose. - Days are read once, two days after they close — GA4 finalises numbers for up to 48 hours, and an event that changes value after delivery is worse than one that is late.
- Daily aggregates only: no user-level data leaves the property, and the events honestly carry
containsPii: false.
What it produces
| Read from the API | Becomes | Data |
|---|---|---|
| One settled day of the property | web.traffic_reported | active_users, sessions, screen_page_views (default) — or your own metric list |
Set up
# 1. Google Cloud console: create a service account, download its JSON key
# 2. GA4 Admin -> Property access management: add the service account email as Viewer
curl -X POST https://api.hookget.com/v1/sources \
-H "authorization: Bearer $HOOKGET_KEY" \
-d '{"provider":"google-analytics",
"secret":"<the JSON key file, pasted whole>",
"config":{"property_id":"123456789","metrics":["activeUsers","sessions","conversions"]},
"backfill_from":"2026-06-01T00:00:00Z"}'
Stated plainly
GA4 keeps refining a day for 24–48 hours, so each day is read once, two days after it closes. This connector is for the durable daily record — spend joins, weekly reports, anomaly alerts — not for the realtime card in the GA4 UI, which their API exposes separately and less stably.
Questions
Why a service account and not my Google login?
A service account is a credential you can scope to one property and revoke in one place, without touching your own account. Granting it Viewer on the property is one step in GA4 Admin, and the JSON key is stored encrypted — no route ever returns it.
Can I choose which metrics arrive?
Yes — config.metrics takes up to eight GA4 metric API names
(activeUsers, conversions, totalRevenue…). They
arrive snake_cased as event metrics, validated before the source is created.