Skip to main content

Google Analytics 4 (GA4) API Connector

Connect GA4 to import campaign, advertising and performance data for reporting and analysis.

Google Analytics 4 (GA4) Logo ...

Overview

Google Analytics 4 (GA4) is Google’s next-generation measurement platform that provides event-based analytics across websites and mobile apps. The GA4 Data API enables programmatic access to GA4’s reporting datasets, including events, user properties, traffic sources, engagement metrics, e-commerce activity, and device/geographic breakdowns.

The connector is designed for retrieving aggregated analytics data for dashboards, reporting, attribution analysis, user behaviour insights, and performance monitoring across digital properties.

GA4 does not expose raw, user-level or event-level logs via the API (that requires BigQuery export). Read more about BigQuery here.

GA4 is entirely event-based, meaning all metrics derive from tracked events and their associated parameters. The connector can retrieve:

Event & Engagement Data

  • Event counts and event parameter values

  • User_engagement time

  • Page views & screen views

  • Scrolls, clicks, outbound link clicks

  • File downloads

  • Session start / session duration

  • Engagement rate

Traffic & Attribution Data

  • Default channel grouping

  • Source, medium, campaign

  • Session source & session campaign

  • UTMs (utm_campaign, utm_source, utm_medium, etc.)

User & Demographic Data

  • User counts (total & active)

  • Geography (country, region, city)

  • Device model, platform, OS, browser

  • Language

  • User properties (custom dimensions)

E-commerce & Revenue

  • Purchase events & revenue

  • Items purchased & item-level parameters

  • Add-to-cart, begin_checkout, add_payment_info, add_shipping_info

  • Basket size, product list performance

  • Promotions and coupon usage

Conversions & Goals

  • GA4 conversions (designated events)

  • Conversion values

  • Funnel steps (based on defined events)

App + Web Data (Combined)

  • App version, screen class, app platform

  • Web + app unified user metrics

  • Firebase event parameters (if linked)

Metadata & Configuration

  • Dimensions & metrics metadata

  • Available event names

  • Custom dimensions and metrics

  • Property settings

Granularity:

GA4 provides flexible reporting granularity, which can be broken down daily, hourly, weekly or monthly.

  • Event level (aggregated)

  • Page-level

  • Traffic source level

  • User property level

  • Item-level (e-commerce)

  • Device and geo breakdown

Purpose:

  • Website and app performance dashboards

  • Behaviour and engagement analysis

  • Conversion and funnel reporting

  • Content performance measurement

  • Attribution and traffic analysis

  • E-commerce revenue and product tracking

  • Combining GA4 with ads platform data for end-to-end performance insights

Refresh Cadence:

Data is refreshed daily.

Update Modes:

Append (for data table), Refresh (for metadata)


Connection

Key

Description

Required

Type

ga_property_ids

Comma‑separated GA4 property IDs

✅

Text

google_client_secret

Google OAuth Client Secret (hidden)

✅

Hidden

google_client_id

Google OAuth Client ID (hidden)

✅

Hidden


Job Configuration

Field

Value

Job Label

GA4 Import

Feed

google_analytics_data

Status

2 (Active)

Lookback

3 days

First Run Hour

6 AM

Poll Frequency

Every 24 hours

Update Mode

append

Lookback Window

0


Targets

Each target represents a table with incoming data. All require the ga_property_ids input (comma-separated GA4 Property IDs).

Table Name

Description

Date Column

googleanalytics4_data_sessions

GA - Session Data

bright_custom_date

googleanalytics4_data_sessions_channel

GA - Sessions Channel Data

bright_custom_date

googleanalytics4_data_sessions_country

GA - Sessions Country Data

bright_custom_date

googleanalytics4_data_event

GA4 - Event Data

bright_custom_date


Dimensions

Name

Result Fields

Medium [GA4]

googleanalytics4_data_sessions.sessionMedium, googleanalytics4_data_event.medium

Campaign [GA4]

googleanalytics4_data_sessions.sessionCampaignName, googleanalytics4_data_event.campaignName

Source [GA4]

googleanalytics4_data_sessions.sessionSource

Default Channel Grouping

googleanalytics4_data_sessions.sessionDefaultChannelGrouping, googleanalytics4_data_sessions_channel.sessionDefaultChannelGrouping

Device [GA4]

googleanalytics4_data_sessions.deviceCategory, googleanalytics4_data_event.deviceCategory

Country [GA4]

googleanalytics4_data_sessions_country.country, googleanalytics4_data_event.country

Event Name [GA4]

googleanalytics4_data_event.eventName


Base Metrics

Name

Formulae

Round

Page Views [GA4]

SUM(screenPageViews) from sessions, sessions_channel, sessions_country

0

Sessions [GA4]

SUM(sessions) from all: sessions, sessions_channel, sessions_country, event

0

Users [GA4]

SUM(totalUsers) from sessions, sessions_channel, sessions_country

0

New Users [GA4]

SUM(newUsers) from sessions, sessions_channel, sessions_country

0

Engagements [GA4]

SUM(engagedSessions) from sessions, sessions_channel, sessions_country

0

Total Session Duration

SUM(userEngagementDuration) from sessions, sessions_channel, sessions_country

0

Conversions [GA4]

SUM(conversions) from googleanalytics4_data_event

0


Composite Metrics

Name

Formula

Format

Avg Session Duration [GA4]

{Total Session Duration [GA4]} / {Sessions [GA4]}

2 decimals, %

Page Views per Session [GA4]

{Page Views [GA4]} / {Sessions [GA4]}

2 decimals, %


Joins

  • Datasource Joins: None configured


Example Use Cases

  • Measure user engagement across device types and countries

  • Analyze session traffic by source/medium/campaign

  • Report marketing performance using session-level and event-based metrics

  • Track conversions and define KPIs like engagement rate or average session duration


Connecting Google Analytics 4 to Google BigQuery

Step-by-step instructions on how to get raw event data from GA4 flowing automatically into Google Cloud's BigQuery database

The Google Analytics 4 (GA4) reporting interface allows users to quickly and easily get stuck into their data and to see what is happening across their website.

However there are some limitations to what the reporting UI will let you do, there are certain constraints in terms of the data (for example data sampling that you cannot control) and there is a degree of 'black box' attribution taking place to attribute your sessions and users to the channels they arrive from. There are also distinct limitations on your ability to bring other data in alongside the GA4 data - such as spend and other metrics from your paid campaigns.

This is where having access to the raw data behind your GA4 reports is incredibly valuable. This data can be used for auditing and investigations, device-level and user-level analytics, path to conversion analytics, visit-engagement 'point scoring', funnel analytics and much much more.

Please note that there is currently no option to export raw historic data from GA4!

The data you will be able to access will begin from the point that you activate the connection.

This article explains how to get the raw data flowing from your Google Analytics 4 property and into a Google BigQuery database instance.
​
You will need:

  1. Administrator access to your GA4 property

    1. if you do have Admin access to GA4 then you will need to ask an administrator to grant Admin access, or ask the administrator to help with this process.
      ​

  2. A Google Cloud Platform account

    1. If you are exploring this data transfer setup on behalf of your employer then you should definitely speak to your IT team at this point.

      1. they may already have a Google Cloud Platform setup

      2. they probably want to know that you are moving data around!

      3. if you go on to incur any charges - see below - then these should probably sit with your IT team

    2. If you do not yet use Google Cloud then you will need to register at https://cloud.google.com

    3. There is a 90 day free trial following sign up, but you will be prompted to attach a credit card to your account

      1. This is primarily to ensure you are not a bot!

      2. There is no automated charging after your free trial ends unless you activate certain Google Cloud features and services

    4. There is a Free Tier of BigQuery usage allowing for

      1. 1 TB of querying per month

      2. 10 GB of storage each month

    5. It is possible / highly likely that you will not exceed these limits but it will depend on the amount of traffic and event tracking on your website as this will determine how much data is transferred into BigQuery and stored.

  3. Once you have an activated Google Cloud account then you will need to create a new project

    1. This project will ultimately contain the BigQuery instance where your GA4 data will be sent and stored

    2. You will be prompted to choose a name for your project

      1. A BigQuery 'instance' mirroring the name you choose will be created within your project

        1. Your project should probably reference your organisation name

          1. e.g BA-BigQuery

    3. Once you have created your project you will see a Project 'dropdown' in the top of the Google Cloud UI


      ​

    4. On the project dashboard you should see a 'Resources' section:

    5. Click on BigQuery and you will be taken to the BigQuery interface

    6. In the middle of the screen you should now see an 'Explorer' section:
      ​

    7. You should see an entry in the list which mirrors (but in lowercase) the name you gave your project : this is the BigQuery instance where your GA4 data will soon be flowing!

  4. Switch back to Google Analytics 4 and locate the Admin section
    ​

    Please note you need to be using a Google Account which has access to both the GA4 Admin page AND the Google Cloud project you just created .
    ​

  5. In GA4 Admin screen you will a link on the left labelled 'Product Links'

    1. under this you will see an entry for 'BigQuery Links':
      ​

      Click on this link and we will finally be at the screen to configure the raw data flow from GA4 into BigQuery

    2. Click 'Link' in the top right of this page

    3. Click 'Choose BigQuery Project'

      1. you should now see the project you just created listed here!

    4. You will now be able to select the datastreams you want to push into BigQuery

    5. You will also be prompted to selected either a daily for streaming flow of data

      1. Daily is typically what most people need but depending on your business model and web / app properties you may wish to have data streaming to BigQuery

      2. There is a daily limit of 1 million events

      3. There is no limit for the Data Streaming option

      4. If you're not sure what to choose at this point then you should definitely be talking to your internal stakeholders and analytics teams about the right options here

    6. Once you have chosen the data delivery settings that suit your needs hit Submit

  6. At this point various things happen behind the scenes on Google's end

    1. creation of a service user account to 'own' the data delivery

    2. a dataset in BigQuery to store your event-level GA4 data

  7. If everything has worked you should soon see a new dataset in your BigQuery instance - which includes your GA4 Property ID:

Did this answer your question?