GA4 Setup for Data Manager
This guide covers the Google Analytics 4 (GA4) side of preparing a client for the Data Manager API integration. It walks through creating a service account, enabling the API, granting property access, and locating the Measurement ID, and lists the values MetaRouter needs to complete the configuration.
Setup Steps
1. Create a Service Account
Follow Google's guide: Set up access — Service Account
Set the scope to include the Data Manager scope:
scopes="https://www.googleapis.com/auth/datamanager"
Once the Service Account is created, go to Keys → Add Key → JSON and download the key file.
2. Enable the Data Manager API
- Open the Google Cloud Console left-side menu → APIs & Services → Library
- Search for Data Manager API
- Click it, then click Enable API
3. Grant the Service Account Access to the GA4 Property
- Sign in to Google Analytics as an administrator
- Admin → Property access management
- Click the blue + button → Add users
- Enter the Service Account's full email address
- Assign a role of Editor or Administrator on the property
- Click Add
4. Find the Measurement ID
You must be an Editor or above on the Analytics account at the property level to view the Measurement ID.
- In Admin, under Data collection and modification, click Data streams
- Select the Web tab, then click the web data stream
- Copy the Measurement ID (begins with
G-) shown in the upper-right of the panel
Each data stream has its own Measurement ID, while all streams in the property share one Property ID.
What MetaRouter Needs
| Needed For | Field | Where to Get It |
|---|---|---|
| Authentication | Service Account email | The Service Account created in Step 1 |
| Authentication | Service Account private key | private_key value inside the downloaded JSON key file |
| Event uploads | Measurement ID | GA4 web data stream, from Step 4 |
Updated about 9 hours ago