Google Analytics Data (GA4): Setup guide
On this page
This guide explains how to collect data from Google Analytics Data (GA4).
Introduction
For a list of the fields that you can collect from Google Analytics Data (GA4), see Google Analytics Data (GA4).
This video guide explains how to create and configure a datastream to collect your website data from Google Analytics Data (GA4).
Limitations
Collecting data from Google Analytics Data (GA4) comes with the following limitations:
-
You can select a maximum of nine dimensions when choosing what data to collect using your Google Analytics Data (GA4) datastream. Custom dimensions count toward this limit.
-
Google Analytics Data (GA4) reports on a maximum of ten metrics at a time. Selecting more than ten affects how zero values should be read. For more information, see Google Analytics Data (GA4): Tips and best practices.
-
Adverity collects data from the Google Analytics Data API, which reports on aggregated data rather than on the individual events behind it. As a result, you cannot reproduce a report built in the Google Analytics 4 interface by configuring a datastream to match it. Select the dimensions and metrics you need instead.
-
Some values shown in the Google Analytics 4 interface are not available through the Google Analytics Data API and cannot be collected. This includes attribution model comparisons, and metrics such as
returningUsersand Metro (DMA). -
For information on how far back you can collect data, see Historical data limitations by connector.
Prerequisites
Before you start collecting data from Google Analytics Data (GA4), perform all of the following actions:
-
Ensure that the account you use to connect to Google Analytics Data (GA4) has Viewer or higher permissions. For more information, see the Google Analytics Data (GA4) documentation.
Creating a datastream to collect data from Google Analytics Data (GA4)
The basics of creating a datastream to collect data from any data source are explained in our guide to Collecting data in Adverity. This guide contains information about the specific steps to create a datastream to fetch data from Google Analytics Data (GA4).
Configuration: Choose the data you want to collect from Google Analytics Data (GA4)
To choose what data to collect and customize the Google Analytics Data (GA4) datastream configuration, follow these steps:
-
(Optional) Rename your datastream.
-
In Property IDs, select the property IDs on which you want to collect data. For more information about property IDs, see the Google documentation.
-
In Dimensions and Metrics, change the list of fields that you want to see in your data extract. For information on combining different dimensions and metrics, see the Google Analytics Data (GA4) documentation.
-
(Optional) In Metadata fields, select the metadata fields that you want to include in the data extract.
-
(Optional) In Custom fields, select the custom fields that you want to include in the data extract.
-
(Optional) In Dimension filter and Metric filter, enter a valid JSON expression to use for data collection. For more information, see Google Analytics Data API documentation.
For example, the following expression filters the values of the
eventNamecolumn. In this example, only entries in which the value of theeventNamecolumn is equal tosession_startwill be collected.{ "filter":{ "fieldName":"eventName", "stringFilter":{ "matchType":"Exact", "value":"session_start", "caseSensitive":true } } }
What’s next?
-
Apply Data Mapping to your collected data to harmonize data collected from different sources in Adverity.
-
Transform your data to meet your needs by creating and applying transformations to your datastream.
-
Load your data into a warehouse to continue working with your data in Adverity.
-
Load your data into an external destination of your choice.