Google Analytics 4 Connector
Prerequisites
- A Google Analytics 4 property
- A Google Cloud project with the Analytics Data API enabled
- A service account with Viewer access to your GA4 property
Getting Your Credentials
GA4 uses a Service Account JSON key and a Property ID for authentication.
Step 1: Find Your GA4 Property ID
- Log into Google Analytics
- Go to Admin (gear icon)
- Under Property Settings > Property Details, find the Property ID (numeric, e.g.,
123456789)
Important: Use the numeric Property ID, not the Measurement ID (which starts with G-).
Step 2: Create a Service Account
- Go to the Google Cloud Console
- Select or create a project
- Go to APIs & Services > Library
- Search for Google Analytics Data API and click Enable
- Go to IAM & Admin > Service Accounts
- Click Create Service Account
- Name it (e.g.,
landed-ga4-reader) - Click Create and Continue
- Skip the optional role assignment and click Done
- Click on the newly created service account
- Go to the Keys tab
- Click Add Key > Create new key > JSON
- Download the JSON key file
Step 3: Grant Access to the GA4 Property
- Copy the service account email (looks like
landed-ga4-reader@project.iam.gserviceaccount.com) - In Google Analytics, go to Admin > Property Access Management
- Click + > Add users
- Enter the service account email
- Set the role to Viewer
- Click Add
Configuration in Landed
| Field | Value |
|---|---|
| GA4 Property ID | Your numeric property ID (e.g., 123456789) |
| Service Account JSON | The full contents of the downloaded JSON key file |
Available Streams
| Stream | Description | Sync Mode |
|---|---|---|
sessions | Session-level data grouped by date, source, and medium. Includes sessions count, bounce rate, average duration. | Incremental |
page_views | Page view counts grouped by date, path, and title | Incremental |
events | Event counts grouped by date and event name | Incremental |
Common Issues
| Symptom | Cause | Fix |
|---|---|---|
Property ID invalid | Using Measurement ID instead of Property ID | Use the numeric ID from Admin > Property Settings, not the G-XXXXXXX ID |
403 Permission denied | Service account not granted Viewer access | Add the service account email as a Viewer in GA4 > Admin > Property Access Management |
API not enabled | Analytics Data API not enabled | Enable the Google Analytics Data API in your Google Cloud Console |
Invalid credentials | Malformed service account JSON | Paste the complete JSON key file contents, including all fields |
| No data returned | Property has no data for the date range | Verify the property is receiving data in the GA4 interface |
Data Notes
- GA4 data is aggregated by date and the configured dimensions -- it is not raw event-level data
- Data may take 24-48 hours to appear in the GA4 API after being collected
- The
property_idfield is included in every record for multi-property setups - All dates are in
YYYY-MM-DDformat
Static IPs for Allowlisting
If your Google Cloud configuration requires IP allowlisting:
- Production:
34.170.185.84,35.192.90.94 - Staging:
34.171.93.34