7.4 KiB
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:
- Log into your Airbyte Cloud account.
- In the left navigation bar, click Sources. In the top-right corner, click + new source.
- On the source setup page, select Google Analytics 4 (GA4) from the Source type dropdown and enter a name for this connector.
- 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.
- Enter the Property ID.
- Enter the Start Date from which to replicate report data in the format YYYY-MM-DD.
- Optionally, to generate Custom Reports, enter a JSON array describing the custom reports you want to sync from Google Analytics.
- 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:
- Go to the Airbyte UI, click Sources, and then click + New source.
- On the Set up the source page, select Google Analytics 4 (GA4) from the Source type dropdown.
- Enter a name for the Google Analytics 4 connector.
- Authenticate your Google account via OAuth or Service Account Key Authentication:
- To authenticate your Google account via OAuth, enter your Google application's client ID, client secret, and refresh token.
- 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.
- Enter the Property ID.
- Enter the Start Date from which to replicate report data in the format YYYY-MM-DD.
- Optionally, to generate Custom Reports, enter a JSON array describing the custom reports you want to sync from Google Analytics.
- 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:
- daily_active_users
- devices
- four_weekly_active_users
- locations
- pages
- traffic_sources
- website_overview
- weekly_active_users
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:segmentdimension. - 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 |