Docs

Google Analytics 4 BigQuery (Service Account) Extractor

What is Google Analytics 4 Extractor?

Google Analytics 4 is an analytics service to measure traffic and engagement across your websites and apps. It collects event-based data from both websites and apps.

Google Analytics 4 BigQuery (Service Account) extractor by Electrik.AI is designed to export Google Analytics 4 property data from your linked BigQuery dataset and load it into your database. You no longer need to manually export GA4 property data to database niether do you need to bother about unnesting the property data or about merging the multiple events_YYYYMMDD tables.

With Electrik.AI’s Google Analytics 4 BigQuery (Service Account) Extractor, you can get daily report in the database of your choice. Electrik.AI makes it easy to get the data you want so that you can focus on analysis and reporting.

How to set up Analytics for a website and/or app

How to add a Google Analytics 4 BigQuery (Service Account) Connection in Electrik.AI?

Follow these steps to connect your Google Analytics 4 BigQuery (Service Account) to Electrik.AI

Step 1: Ensure you have following prerequisites to create a Google Analytics 4 BigQuery (Service Account) Connection in Electrik.AI

  1. Access to Google BigQuery Project (the one Linked to GA4 property)
  2. Google BigQuery Service Account Key File (extension JSON).
  3. Google Analytics Account ID

Step 2: Sign-in into your Electrik.AI account

Step 3: Select IO in Electrik.AI dashboard

Select IO in ElectrikAI Dashboard - ElectrikAI

Step 4: Select the Connections tab in the left most panel and click on “Add” button.

Select the Connections tab in the left most panel Conn - ElectrikAI

Step 5: The Source default tab is selected just click on “Google Analytics 4 BigQuery (Service Account)” connection.

Source default tab is selected just click on Google Analytics 4 BigQuery (Service Account) connection - ElectrikAI

Step 6: Provide your Google Analytics 4 BigQuery (Service Account) details.

  1. Choose the BigQuery Service Account Key File
  2. Choose the project that is linked to your GA4 Property
  3. Select the dataset created by GA4 in your project for the linked GA4 property viz analytics_<property_id>
  4. Provide your Google Analytics Account ID (Make sure you provide correct id as it will not get validated)
Provide your Google Analytics 4 BigQuery (Service Account) details

Step 7: Click on Save button on the top right corner of the screen.

Click on Save button on the top right corner of the screen - ElectrikAI

Congratulations, you have successfully created a Google Analytics 4 BigQuery (Service Account) Connection in Electrik.AI

Congratulations, you have successfully created a Google Analytics 4 BigQuery (Service Account) Connection - ElectrikAi

What are the supported Data Destinations?

Electrik.AI supports the following databases and Data Warehouse to export Google Analytics Data. It is important to note that Electrik.AI itself is not a destination. A destination is required to export data from various marketing data sources using Electrik.AI

PostgreSQL Data Destination-Eletrik.AI
MySQL Data Destination-Electrik.AI
AzureSQL Data Destination-Eletrik.AI

How to export Google Analytics 4 Data?

Electrik.AI creates a data flow (or ETL process) that exports Google Analytics 4 property data to a target database or data warehouse or cloud storage. This process runs daily at scheduled time and exports data for the previous day.

Follow these steps to create a Data Flow from Google Analytics 4 BigQuery (Service Account) to Google BigQuery

Step 1: Ensure you have the following prerequisites.

  1. Access to Google BigQuery Project (the one Linked to GA4 property)
  2. Google BigQuery Service Account Key File (extension JSON).
  3. Google Analytics Account ID
  4. Access to a Database of your choice (PostgreSQL, MySQL, Azure SQL)
  5. Database Connection Details such as Host, Port, DB Name, DB User.

Step 2: Sign-in into your Electrik.AI account.
Step 3: Select IO in Electrik.AI dashboard

Select IO in ElectrikAI Dashboard - ElectrikAI

Step 4: Select the Connections Icon in the left most panel and Click on Add button to create a Google Analytics 4 BigQuery (Service Account) Data Extractor Flow.

Select the Connections Icon in the left most panel Flow - ElectrikAI

Step 5: Select Google Analytics 4 BigQuery (Service Account) Connection present in the list of available sources.

Conn Step5-Select-the-Connections-Icon-in-the-left-most-panel-Flow-ElectrikAI

Step 6: Select your existing Google Analytics 4 BigQuery (Service Account) connection in Electrik.AI.

Select your existing Google Analytics 4 BigQuery (Service Account) connection - ElectrikAI

To configure a new connection, refer to this link.

Step 7: Click on a destination of your choice from list of available destinations.

In this example we are choosing PostgreSQL. 

Click on a destination of your choice from list of available destinations - ElectrikAI

Step 8: Click on a destination of your choice from list of available destinations. 

Click on a destination of your choice from list of available destinationss - ElectrikAI

 Step 9: Review the Data Source, Data Destination, Database Schema, Provide Success Notification Email, Failure Notification Email. Click “Save and Proceed” to continue.

Review the Data Source Data Destination Database Schema - ElectrikAI

Success Notification Email: Enter a valid Email ID to receive the Flow Success Email Notification.
Failure Notification Email: Enter a valid Email ID to receive the Flow Failure Email Notification.
Note: By Default, Electrik.AI uses the signed-in user’s Email Id.

Congratulations, Flow is created. Please wait while you are redirected to Flow Details Screen.

Congratulations, Flow is created. Please wait while you are redirected to Flow Details Screen - ElectrikAI

You have now successfully setup Google Analytics 4 BigQuery (Service Account) to PostgreSQL flow in Electrik.AI

You have now successfully setup Google Analytics 4 BigQuery (Service Account) to PostgreSQL flow in ElectrikAI

You have now successfully setup Google Analytics 4 BigQuery (Service Account) to PostgreSQL flow in Electrik.AI

Your Google Analytics data will start loading after 24 hours in your Google BigQuery Dataset - ElectrikAI

How to find your account_id in Google Analytics

Step 1: Login to your Google Analytics account.

Step 2: Click on ‘Admin’, in lower left corner of your screen.

Click on Admin, in lower left corner of your screen - ElectrikAI

Step 3: Click on ‘Account Settings’

Click on GA4 Account Settings - ElectrikAI

Step 4: Copy the “Account Id”

Copy the GA4 Account Id - ElectrikAI