1
0
mirror of synced 2026-01-09 06:03:17 -05:00
Files
airbyte/docs/integrations/sources/google-analytics-data-api.md
2023-03-14 15:33:47 -04:00

7.4 KiB

Google Analytics 4 (GA4)

This page guides you through the process of setting up the Google Analytics 4 source connector.

This connector supports GA4 properties through the Analytics Data API v1.

Prerequisites

A Google Cloud account with Viewer permissions and Google Analytics Reporting API and Google Analytics API enabled.

Setup guide

For Airbyte Cloud:

To set up Google Analytics 4 as a source in Airbyte Cloud:

  1. Log into your Airbyte Cloud account.
  2. In the left navigation bar, click Sources. In the top-right corner, click + new source.
  3. On the source setup page, select Google Analytics 4 (GA4) from the Source type dropdown and enter a name for this connector.
  4. Authenticate your Google account via OAuth or Service Account Key Authentication.
    • (Recommended) To authenticate your Google account via OAuth, click Sign in with Google and complete the authentication workflow.
    • To authenticate your Google account via Service Account Key Authentication, enter your Google Cloud service account key in JSON format. Use the service account email address to add a user to the Google analytics view you want to access via the API and grant the Viewer permission.
  5. Enter the Property ID.
  6. Enter the Start Date from which to replicate report data in the format YYYY-MM-DD.
  7. Optionally, to generate Custom Reports, enter a JSON array describing the custom reports you want to sync from Google Analytics.
  8. Leave Data request time increment in days (Optional) blank or set to 1. For faster syncs, set this value to more than 1 but that might result in inaccuracies in the returned results. The maximum allowed value is 364.

For Airbyte Open Source:

To set up Google Analytics 4 as a source in Airbyte Open Source:

  1. Go to the Airbyte UI, click Sources, and then click + New source.
  2. On the Set up the source page, select Google Analytics 4 (GA4) from the Source type dropdown.
  3. Enter a name for the Google Analytics 4 connector.
  4. Authenticate your Google account via OAuth or Service Account Key Authentication:
  5. Enter the Property ID.
  6. Enter the Start Date from which to replicate report data in the format YYYY-MM-DD.
  7. Optionally, to generate Custom Reports, enter a JSON array describing the custom reports you want to sync from Google Analytics.
  8. Leave Data request time increment in days (Optional) blank or set to 1. For faster syncs, set this value to more than 1 but that might result in inaccuracies in the returned results. The maximum allowed value is 364.

Supported sync modes

The Google Analytics source connector supports the following sync modes:

Supported Streams

This connector outputs the following incremental streams:

Custom reports

  • Custom reports in format [{"name": "<report-name>", "dimensions": ["<dimension-name>", ...], "metrics": ["<metric-name>", ...]}]
  • Custom report format when using segments and / or filters [{"name": "<report-name>", "dimensions": ["<dimension-name>", ...], "metrics": ["<metric-name>", ...], "segments": ["<segment-id-or-dynamic-segment-v3-format]", filter: "<filter-definition-v3-format>"}]
  • When using segments, make sure you add the ga:segment dimension.
  • Custom reports: Dimensions and metrics explorer

Changelog

Version Date Pull Request Subject
0.1.2 2023-03-07 23822 Improve rate limits customer faced error messages and retry logic for 429
0.1.1 2023-01-10 21169 Slicer updated, unit tests added
0.1.0 2023-01-08 20889 Improved config validation, SAT
0.0.3 2022-08-15 15229 Source Google Analytics Data Api: code refactoring
0.0.2 2022-07-27 15087 fix documentationUrl
0.0.1 2022-05-09 12701 Introduce Google Analytics Data API source