Skip to main content
Google Analytics 4 holds your audience truth — who visits, where they come from, what they do, and where they drop off. These seven jobs pull that data through Mavera’s surfaces (Custom Personas, Mave Agent, Focus Groups, Generate) so your personas, content, and creative are grounded in real behavioral data instead of assumptions.

API Reference Card

All examples use three environment variables: GOOGLE_APPLICATION_CREDENTIALS (path to service account JSON), GA4_PROPERTY_ID (numeric property ID, e.g. 123456789), and MAVERA_API_KEY. Python examples use the google-analytics-data client library; JavaScript examples use the REST API directly with a service account access token.

Prerequisites

1

GA4 property with data

You need an active GA4 property with at least 30 days of traffic. Find the property ID in GA4 → Admin → Property Settings.
2

Service account with GA4 access

Create a service account in Google Cloud, download the JSON key, then add the service account email as a Viewer in GA4 → Admin → Property Access Management.
3

Enable the Analytics Data API

In Google Cloud Console, navigate to APIs & Services → Enable the Google Analytics Data API.
4

Install dependencies

5

Environment variables


Jobs


Rate Limits & Production Notes

The GA4 Data API enforces 10 concurrent requests per property. If you run jobs 1–7 in parallel, you’ll exceed this limit. Run sequentially or batch with 300ms delays. Retry on 429 with exponential backoff.
Production checklist:

What’s Next

All Integrations

50+ API integrations with full code

GA4 Data API Docs

Official GA4 Data API reference

Personas API

Full reference for POST /api/v1/personas

Focus Groups API

Full reference for POST /api/v1/focus-groups

Mave Agent

Full reference for POST /api/v1/mave/chat

Generate API

Full reference for POST /api/v1/generations