Skip to main content

Set up Google Analytics 4 and Google BigQuery for Databricks ingestion

Preview

The Google Analytics Raw Data connector is in Public Preview.

This article describes how to set up Google Analytics 4 (GA4) and Google BigQuery (BigQuery) to ingest raw, event-level data into Databricks.

BigQuery setup

Enable the APIs

  1. Identify the BigQuery project containing your exported GA4 data.

  2. Enable the following APIs on that project, following Google’s instructions:

Set up a GCP service account

To ingest your GA4 data from this BigQuery project, you need a GCP service account that corresponds to it.

  1. In the top menu of the Service Accounts page, click + CREATE SERVICE ACCOUNT.

    Create a GA4 service account

  2. Under Grant this service account access to the project, enable the following roles:

    • BigQuery Data Viewer
    • BigQuery Job User
    • BigQuery Read Session User

    Grant service account access to BigQuery project

  3. Complete service account creation.

  4. On the Service accounts page, click the service account you created.

  5. On the KEYS tab, click ADD KEY > Create new key.

    Create a new key

  6. In the Create private key modal, for Key type, select JSON.

  7. Click CREATE.

    This downloads your service account JSON key.

    Download service account JSON key

GA4 setup

Identify the GA4 property that you want to ingest from and export the property’s data to BigQuery. For instructions, see Set Up BigQuery Export in the Google documentation.