Sync data from Google Analytics 4 to your warehouse destination via RudderStack.
5 minute read
RudderStack’s Cloud Extract (ETL) product will be sunset on December 1, 2025. See this release note for more details.
Google Analytics 4 is an analytics service that enables you to measure traffic and engagement across your websites and apps.
This document guides you in setting up Google Analytics 4 as a source in RudderStack. Once configured, RudderStack automatically ingests your Google Analytics 4 data and routes it to your specified data warehouse destination.
Go to Sources > New source > Cloud Extract and select Google Analytics 4 from the list of sources.
Assign a name to your source and click Continue.
Connection settings
Next, configure the following dashboard settings:
Credentials: From the dropdown, select the authentication mechanism for RudderStack to connect to the Google Analytics 4 API.
Authenticate via Google (OAuth): To authenticate via OAuth, click the Sign in with Google button, select your Google account, and give RudderStack the required permissions.
Service Account Key Authentication: Enter your service account JSON credentials in the Service Account Information field.
Date Range Start Date: Choose the start date from which you want RudderStack to ingest the Google Analytics 4 data. RudderStack will not replicate any data before this date.
Custom Reports: Use this setting to sync your custom Google Analytics 4 reports. To add a custom report, click Add Report and specify the Report Name, Metrics, and Dimensions:
You can sync multiple reports, and edit or delete a custom report.
Data request time increment in days: Enter the number of days after which RudderStack requests data from the Google Analytics 4 API. The minimum and maximum allowed values for this field are 1 and 364 respectively.
It is highly recommended to set this value to 1. A higher value will lead to faster syncs, but it is more likely to apply sampling on your data, causing potential inaccuracies in the results.
Destination settings
The following settings specify how RudderStack sends the data ingested from Google Analytics 4 to the connected warehouse destination:
Table prefix: RudderStack uses this prefix to create a table in your data warehouse and loads all your Google Analytics 4 data into it.
Note that RudderStack does not add special characters like - or _ to the prefix by default. Hence, you need to specify it while setting the prefix.
Schedule Settings: RudderStack gives you three options to ingest the data from Google Analytics 4:
Basic: Runs the syncs at the specified time interval.
CRON: Runs the syncs based on the user-defined CRON expression.
Manual: You are required to run the syncs manually.
For more information on the schedule types, refer to the Common Settings guide.
Selecting the data to import
You can choose the predefined Google Analytics 4 reports from which you want to ingest the data by selecting them in this window:
Any custom reports configured using the Custom Reports dashboard setting will also be shown here.
The below table mentions the sync types supported by the Google Analytics 4 resources while syncing data to your warehouse destination:
Resource
Sync type
Primary key
daily_active_users
Incremental
uuid
devices
Incremental
uuid
four_weekly_active_users
Incremental
uuid
locations
Incremental
uuid
pages
Incremental
uuid
traffic_sources
Incremental
uuid
website_overview
Incremental
uuid
weekly_active_users
Incremental
uuid
For syncing all reports, RudderStack uses the analyticsdata.googleapis.com/v1beta/{property_id}/runReport API.
This source only supports Incremental reports with date as a required dimension.
For more information on the Incremental sync mode, refer to the Common Settings guide.
Google Analytics 4 is now configured as a source. RudderStack will start ingesting data from Google Analytics 4 as per your specified schedule and frequency.
You can further connect this source to your data warehouse by clicking the Add Destination button:
Use the Use Existing Destination option if you have an already-configured data warehouse destination in RudderStack. To configure a data warehouse destination from scratch, select the Create New Destination button.
FAQ
Is it possible to have multiple Cloud Extract sources writing to the same schema?
Yes, it is.
RudderStack associates a table prefix for every Cloud Extract source writing to a warehouse schema. This way, multiple Cloud Extract sources can write to the same schema with different table prefixes.
How does RudderStack count the events for Cloud Extract sources?
RudderStack counts the number of records returned by the source APIs when queried during each sync. It considers each record as an event.
How does RudderStack set the table name for the data sent via Cloud Extract sources?
RudderStack sets the table name for the resource you are syncing to the warehouse by adding rudder_ to the Table prefix you set while configuring your Cloud Extract source in the dashboard.
For example, if you set test_ as the Table prefix in the dashboard, RudderStack sets the table name as test_rudder_<resource_name>, where <resource_name> is the name of the resource you are syncing (for example, contacts, messages, etc.).
Note that RudderStack does not add the character _ to the prefix by default. Hence, you need to specify it while setting the prefix.
Why am I getting a 403 Client Error while setting up the Google Analytics 4 source?
You must assign the following permissions in Google Analytics 4 to set it up as an Extract source successfully:
This site uses cookies to improve your experience while you navigate through the website. Out of
these
cookies, the cookies that are categorized as necessary are stored on your browser as they are as
essential
for the working of basic functionalities of the website. We also use third-party cookies that
help
us
analyze and understand how you use this website. These cookies will be stored in your browser
only
with
your
consent. You also have the option to opt-out of these cookies. But opting out of some of these
cookies
may
have an effect on your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. This
category only includes cookies that ensures basic functionalities and security
features of the website. These cookies do not store any personal information.
This site uses cookies to improve your experience. If you want to
learn more about cookies and why we use them, visit our cookie
policy. We'll assume you're ok with this, but you can opt-out if you wish Cookie Settings.