Skip to main content
Kodda reads reporting data from Google Analytics 4 (GA4) properties through the Google Analytics Data API, using a Google service account. Set up the service account once, create a Kodda connection for it, and then generate mappings that pull the metrics and dimensions you need into any target.
Google retired Universal Analytics (the Reporting API v3) in 2024. Kodda connects to Google Analytics 4 properties only.

Establish Connection Between Kodda and Google Analytics

1. Create API Project

Create or use an existing project in the Google Cloud Console. Go to https://console.cloud.google.com/ and sign in with your Google account. Select an existing project or click New project to create one.

2. Enable APIs

The following APIs must be enabled on the project:
  • Google Analytics Data API — used to run reports.
  • Google Analytics Admin API — used to list the accounts and properties the service account can see.
From APIs & Services, choose Enable APIs and services, search for each API by name and click Enable.

3. Generate a Service Account

A service account gives Kodda its own identity for reading your Google Analytics data. From the left navigation, click Credentials, then Create credentials > Service account. Enter a name; a role is not required. After the service account is created, open it, go to the Keys tab, click Add key > Create new key, choose JSON and download the key file. You will paste the contents of this file into the Kodda connection.

4. Grant the Service Account Access to Google Analytics

In Google Analytics go to Admin > Account access management (or Property access management to limit access to one property) and add the service account’s email address — the client_email value in the JSON key file — as a user with the Viewer role.

5. Create the Connection in Kodda

In Manage Connections, create a connection of type Google Analytics 4, paste the full contents of the JSON key file into Service Account Credentials (JSON), and set the query rate limit. Use Test Connection to confirm Kodda can reach the API with the key.

Integrate Data from GA4

Select Source

To move data from Google Analytics, generate a new mapping with your Google Analytics 4 connection as the source and any target connection you choose. The center panel changes to Generate Mappings for Dimensions and Metrics. Under View, select the Account and then the Property. Both lists are populated from Google with the accounts and properties the service account has been granted access to. If a property is missing, check the access granted in step 4.

Select Query Parameters

Each mapping is a single GA4 report. Choose the date range start, the metrics and the dimensions. For the full list of available fields see Google’s GA4 Dimensions & Metrics Explorer. The names shown in the lists are Google’s display names; the selected items show the API names (for example activeUsers, deviceCategory), which become the column names in the target table.

Select Target Schema and Table

Under Target, select the schema and table to load into. Choose an existing schema or table from the list, or type a new name and press Enter to have Kodda create it.

Available Activities

  • Generate Mapping — creates the mapping. It is enabled once an account, property, start date, at least one metric, and the target schema and table have been set.
  • Preview Data — runs the report with the selected parameters and shows the first rows, so you can confirm the metric and dimension combination is valid before generating the mapping. Google rejects some combinations of dimensions and metrics; the preview reports the error.

Mapping Options

All of the run-time options described under Generate Mapping and Edit Mapping apply to Google Analytics mappings. One option is unique to Google Analytics sources:
The option is set from the Run-time Options section of the Edit Mapping screen after the mapping has been generated.