Skip to main content

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

  1. Log into Google Analytics
  2. Go to Admin (gear icon)
  3. 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

  1. Go to the Google Cloud Console
  2. Select or create a project
  3. Go to APIs & Services > Library
  4. Search for Google Analytics Data API and click Enable
  5. Go to IAM & Admin > Service Accounts
  6. Click Create Service Account
  7. Name it (e.g., landed-ga4-reader)
  8. Click Create and Continue
  9. Skip the optional role assignment and click Done
  10. Click on the newly created service account
  11. Go to the Keys tab
  12. Click Add Key > Create new key > JSON
  13. Download the JSON key file

Step 3: Grant Access to the GA4 Property

  1. Copy the service account email (looks like landed-ga4-reader@project.iam.gserviceaccount.com)
  2. In Google Analytics, go to Admin > Property Access Management
  3. Click + > Add users
  4. Enter the service account email
  5. Set the role to Viewer
  6. Click Add

Configuration in Landed

FieldValue
GA4 Property IDYour numeric property ID (e.g., 123456789)
Service Account JSONThe full contents of the downloaded JSON key file

Available Streams

StreamDescriptionSync Mode
sessionsSession-level data grouped by date, source, and medium. Includes sessions count, bounce rate, average duration.Incremental
page_viewsPage view counts grouped by date, path, and titleIncremental
eventsEvent counts grouped by date and event nameIncremental

Common Issues

SymptomCauseFix
Property ID invalidUsing Measurement ID instead of Property IDUse the numeric ID from Admin > Property Settings, not the G-XXXXXXX ID
403 Permission deniedService account not granted Viewer accessAdd the service account email as a Viewer in GA4 > Admin > Property Access Management
API not enabledAnalytics Data API not enabledEnable the Google Analytics Data API in your Google Cloud Console
Invalid credentialsMalformed service account JSONPaste the complete JSON key file contents, including all fields
No data returnedProperty has no data for the date rangeVerify 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_id field is included in every record for multi-property setups
  • All dates are in YYYY-MM-DD format

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