Collect Google Analytics 4 data with the Data Platform connector
Google Analytics 4 (GA4) is Google's next-generation analytics platform that helps you understand customer behavior across websites and apps
Objective
Google Analytics 4 (GA4) is Google's next-generation analytics platform that helps you understand customer behavior across websites and apps. The Data Platform lets you integrate GA4 data to build powerful, data-driven applications.
Requirements
Before you begin, ensure you have:
- Google Analytics 4 Property - You must be using GA4 (not Universal Analytics)
- Google Cloud Console Access - Ability to create projects and service accounts
- GA4 Admin Permissions - Editor or Administrator role on the GA4 property
- Data Platform Access - Permissions to create sources in the Connectors
Note: Universal Analytics (GA3) is no longer supported. If you're still using Universal Analytics, you must migrate to GA4 first.
Configuration Steps
Step 1: Get your GA4 Property ID
The Property ID identifies your GA4 property.
- Log into Google Analytics
- Click Admin (gear icon in bottom left)
- In the Property column, click Property Details
- Copy your Property ID (format:
123456789)
The Property ID is a numeric value, different from the old View ID format used in Universal Analytics.
Step 2: Create Google Service Account
A Service Account allows the Data Platform to securely access your GA4 data without requiring individual user credentials.
2.1 Create or Open Google Cloud Project
- Navigate to Google Cloud Console
- If you already have a project: Click Create or Select a project and choose your existing project
- If you need to create a new project:
- Click Create or Select a project → NEW PROJECT
- Enter a Project name (e.g., "DataPlatform-GA4-Integration")
- Click CREATE
2.2 Enable Google Analytics Data API
- In the Cloud Console, go to APIs & Services from the quick access menu
- Click on + Enable APIs and Services
- Search for "Google Analytics Data API"
- Select Google Analytics Data API (not Analytics Reporting API)
- Click ENABLE
Make sure to enable the Google Analytics Data API for GA4, not the older Analytics Reporting API.
2.3 Create Service Account
- Go to APIs & Services → Credentials
- Click CREATE CREDENTIALS → Service account
- Enter a Service account name (e.g., "dataplatform-ga4-reader")
- Add description (optional)
- Click CREATE AND CONTINUE
2.4 Assign Permissions (Optional)
- For Role, select Viewer (optional for this step)
- Click CONTINUE
- Click DONE
2.5 Generate JSON Key
- Find your newly created service account in the list
- Click the service account email to open details
- Go to the KEYS tab
- Click ADD KEY → Create new key
- Select JSON format
- Click CREATE
The JSON key file will automatically download. Keep it secure - this contains credentials to access your data.
2.6 Copy Service Account Email
From the service account details page, copy the email address (format: service-account-name@project-id.iam.gserviceaccount.com)
You'll need this in the next step.
Step 3: Grant Analytics Permissions
Now you need to give the Service Account permission to read your GA4 data.
- Log into Google Analytics
- Click Admin (gear icon in bottom left)
- In the Property column, click Property access management
- Click the + icon (top right) → Add users
- Enter the Service Account email from Step 2.6
- Uncheck Notify new users by email
- Select role: Viewer
- Click Add
You've now granted the Data Platform read-only access to your GA4 data through the Service Account.
Step 4: Configure Source on Data Platform
- In the Data Platform Connectors, find Google Analytics in the source store
- Click Select to open the configuration screen
- Fill in the required fields:
- Click Connect to test the connection
- If successful, click Create (top right)
Remember to name your source before creating it. The technical name cannot be changed later and will be used in SDK calls.
Your Google Analytics 4 source is now connected and ready to use! 🚀
Troubleshooting
Common Issues
"Invalid credentials" error
- Verify the JSON key file content is complete and valid
- Ensure no extra spaces or characters when pasting
- Check that the Service Account email is correct
"Permission denied" error
- Confirm the Service Account has Viewer access to the GA4 property
- Wait 5-10 minutes for permissions to propagate
- Verify you're using the correct Property ID
"API not enabled" error
- Ensure Google Analytics Data API is enabled in your Google Cloud Project
- Confirm you're in the correct Google Cloud Project
"Property not found" error
- Verify the Property ID is correct (numeric, no spaces)
- Ensure you're using a GA4 Property ID, not a Universal Analytics View ID
- Check that the property hasn't been deleted
Go further
If you need training or technical assistance to implement our solutions, contact your sales representative or click on this link to get a quote and ask our Professional Services experts for a custom analysis of your project.
Ask questions, give your feedback and interact directly with the team building the Data Platform on the dedicated Discord channel.
If you need support with your OVHcloud services, create a request in our Help Centre.
Join our community of users.

