Google Analytics Data (GA4): Setup guide#

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).

Note

Google Analytics Data (GA4) uses estimates in some data calculations. As a result, when comparing data from Google Analytics Data (GA4) with data in Adverity, we recommend comparing data at the row level, as this will be more accurate than comparing totals.

For more information, see Google Analytics Data (GA4): Troubleshooting.

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 returningUsers and 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:

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).

Authorization: Allow Adverity to access Google Analytics Data (GA4)#

Google Analytics Data (GA4) uses the same authorization as Google Analytics.

  1. If you choose Access using your credentials or Access using someone else’s credentials, in Set up or edit Properties, you or the person granting access must choose one of the following options:

    • Choose Grant access to all items, including those created in the future to give Adverity Properties to access all existing items and all items created in the future.

    • Choose Select specific items to which you want to grant access to only give Adverity Properties to access the selected items. Adverity will not automatically have access to items created in the future. You will need to grant Adverity access to any items created in the future.

    Warning

    If you use your credentials to grant Adverity access to Google Analytics Data (GA4), all the items available to you using your credentials will be visible in the Authorizations page to all Adverity users with permission to edit this authorization.

    If someone else uses their credentials to grant Adverity access to Google Analytics Data (GA4), the same applies to the items available using their credentials.

    This is important to consider if you do not want all Adverity users with permission to edit the authorization to be able to see the details of the authorization items. For more information about user permissions, see Managing user permissions.

Configuration: Choose the data you want to collect from Google Analytics Data (GA4)#

Note

This connector reports data in the timezone configured in your Google Analytics 4 property’s settings.

To choose what data to collect and customize the Google Analytics Data (GA4) datastream configuration, follow these steps:

  1. (Optional) Rename your datastream.

  2. In Property IDs, select the property IDs on which you want to collect data. For more information about property IDs, see the Google documentation.

  3. 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.

  4. (Optional) In Metadata fields, select the metadata fields that you want to include in the data extract.

  5. (Optional) In Custom fields, select the custom fields that you want to include in the data extract.

    Note

    Custom dimensions and metrics belong to individual properties, so this list is only populated after you select the properties to collect from. A custom field that a property does not define is not collected for that property, and no column appears for it.

    A custom dimension that you have just created in Google Analytics 4 can take up to an hour to appear in this list.

  6. (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 eventName column. In this example, only entries in which the value of the eventName column is equal to session_start will be collected.

    {
        "filter":{
            "fieldName":"eventName",
            "stringFilter":{
                "matchType":"Exact",
                "value":"session_start",
                "caseSensitive":true
            }
        }
    }
    

What’s next?#