---
title: "Collect Google Analytics 4 data with the Data Platform connector"
description: "Google Analytics 4 (GA4) is Google's next-generation analytics platform that helps you understand customer behavior across websites and apps"
url: https://docs.ovhcloud.com/de/guides/public-cloud/data-platform/connectors-sources-google-analytics
lang: de
lastUpdated: 2026-09-14
---
> For AI agents: the complete documentation index is available at https://docs.ovhcloud.com/de/llms.txt, the full documentation bundle is available at https://docs.ovhcloud.com/de/llms-full.txt.

# Collect Google Analytics 4 data with the Data Platform connector

## 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.

![Google analytics store page](/images/public-cloud/data-platform/product/connectors/sources/connectors/google-analytics/picts/google-analytics-store-page-2.png)
## Requirements

Before you begin, ensure you have:

1. **Google Analytics 4 Property** - You must be using GA4 (not Universal Analytics)
2. **Google Cloud Console Access** - Ability to create projects and service accounts
3. **GA4 Admin Permissions** - Editor or Administrator role on the GA4 property
4. **Data Platform Access** - Permissions to create sources in the Connectors

:::info
**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.

1. Log into [Google Analytics](https://analytics.google.com)
2. Click **Admin** (gear icon in bottom left)
3. In the **Property** column, click **Property Details**
4. Copy your **Property ID** (format: `123456789`)

![Step 1: Get your GA4 Property ID — Google analytics property id](/images/public-cloud/data-platform/product/connectors/sources/connectors/google-analytics/picts/google-analytics-property-id.png)
:::info
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

1. Navigate to [Google Cloud Console](https://console.cloud.google.com)
2. **If you already have a project:** Click **Create or Select a project** and choose your existing project
3. **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.1 Create or Open Google Cloud Project — Google analytics create project](/images/public-cloud/data-platform/product/connectors/sources/connectors/google-analytics/picts/google-analytics-create-project.png)
#### 2.2 Enable Google Analytics Data API

1. In the Cloud Console, go to **APIs & Services** from the quick access menu
2. Click on **+ Enable APIs and Services**
3. Search for **"Google Analytics Data API"**
4. Select **Google Analytics Data API** (not Analytics Reporting API)
5. Click **ENABLE**

![2.2 Enable Google Analytics Data API — Google analytics api library](/images/public-cloud/data-platform/product/connectors/sources/connectors/google-analytics/picts/google-analytics-api-library.png)
![2.2 Enable Google Analytics Data API — Google analytics data api](/images/public-cloud/data-platform/product/connectors/sources/connectors/google-analytics/picts/google-analytics-data-api.png)
:::info
Make sure to enable the **Google Analytics Data API** for GA4, not the older Analytics Reporting API.
:::

#### 2.3 Create Service Account

1. Go to **APIs & Services** → **Credentials**
2. Click **CREATE CREDENTIALS** → **Service account**
3. Enter a **Service account name** (e.g., "dataplatform-ga4-reader")
4. Add description (optional)
5. Click **CREATE AND CONTINUE**

![2.3 Create Service Account — Google analytics service account](/images/public-cloud/data-platform/product/connectors/sources/connectors/google-analytics/picts/google-analytics-service-account.png)
#### 2.4 Assign Permissions (Optional)

1. For **Role**, select **Viewer** (optional for this step)
2. Click **CONTINUE**
3. Click **DONE**

#### 2.5 Generate JSON Key

1. Find your newly created service account in the list
2. Click the **service account email** to open details
3. Go to the **KEYS** tab
4. Click **ADD KEY** → **Create new key**
5. Select **JSON** format
6. Click **CREATE**

![2.5 Generate JSON Key — Google analytics json key](/images/public-cloud/data-platform/product/connectors/sources/connectors/google-analytics/picts/google-analytics-json-key.png)
![2.5 Generate JSON Key — Google analytics json key type](/images/public-cloud/data-platform/product/connectors/sources/connectors/google-analytics/picts/google-analytics-json-key-type.png)
![2.5 Generate JSON Key — Google analytics json key download](/images/public-cloud/data-platform/product/connectors/sources/connectors/google-analytics/picts/google-analytics-json-key-download.png)
:::info
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.

1. Log into [Google Analytics](https://analytics.google.com)
2. Click **Admin** (gear icon in bottom left)
3. In the **Property** column, click **Property access management**
4. Click the **+** icon (top right) → **Add users**
5. Enter the **Service Account email** from Step 2.6
6. Uncheck **Notify new users by email**
7. Select role: **Viewer**
8. Click **Add**

![Step 3: Grant Analytics Permissions — Google analytics add user](/images/public-cloud/data-platform/product/connectors/sources/connectors/google-analytics/picts/google-analytics-add-user.png)
![Step 3: Grant Analytics Permissions — Google analytics add user role](/images/public-cloud/data-platform/product/connectors/sources/connectors/google-analytics/picts/google-analytics-add-user-role.png)
:::info
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

1. In the Data Platform **Connectors**, find **Google Analytics** in the source store
2. Click **Select** to open the configuration screen

![Step 4: Configure Source on Data Platform — Google analytics configure source](/images/public-cloud/data-platform/product/connectors/sources/connectors/google-analytics/picts/google-analytics-configure-source.png)
3. Fill in the required fields:

| Field                    | Description                                 | Example                   |
| ------------------------ | ------------------------------------------- | ------------------------- |
| **Property ID**          | Your GA4 Property ID from Step 1            | `123456789`               |
| **Service Account JSON** | Contents of the JSON key file from Step 2.5 | Paste entire JSON content |

4. Click **Connect** to test the connection
5. If successful, click **Create** (top right)

:::warning
Remember to name your source before creating it. The technical name cannot be changed later and will be used in SDK calls.
:::

:::info
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](https://www.ovhcloud.com/de/professional-services/) 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](https://discord.gg/ovhcloud).

If you need support with your OVHcloud services, create a request in our [Help Centre](https://help.ovhcloud.com/csm?id=csm_get_help).

Join our [community of users](https://community.ovhcloud.com/).
