Google Analytics 4

Configure Google Analytics 4 (GA4) with Zing Data via BigQuery

Google Analytics 4 (GA4) is a supported data source for Zing Data, via a BigQuery connection. This lets you leverage Zing Data for streamlined query generation, mobile access, dashboard creation, and real-time alerts on top of your GA4 data.

Zing Data is a trusted Google Cloud Partner.

Step 1: Set Up Google Analytics 4

First ensure that your website has Google Analytics 4 properly configured. GA4 offers a wealth of user behavior data that you’ll be tapping into. Once your GA4 account is in place, proceed to the Google Analytics dashboard at analytics.google.com.

Step 2: Create a BigQuery Project

  1. If you don’t have a BigQuery project, head over to cloud.google.com and create one (free tier available).
  2. Enable the BigQuery API for your project.
  1. Navigate to the Admin section in Google Analytics.
  2. Scroll down and locate “BigQuery Link” under “Data Streams.”
  3. Click “Link” to establish a connection between your GA4 account and BigQuery.

Step 4: Wait 24-48 hours

GA4 data does not immediately sync to BigQuery and it can take even a few days (more than 24 hours from our testing) before you start seeing GA4 tables and events in BigQuery.

Step 5: Set up a view with data from all individual days of events

  1. Within the BigQuery section of cloud.google.com, click **new query **from one of the event tables which has been populated by GA4. It will look something like events_20230817 or events_intraday_20230817

  2. Create a query with the following text, then save and save as view

    SELECT * FROM ‘<PROJECT_ID>.<DATASOURCE_ID>.events_*`

This combines all daily events tables to make them queryable as a single table, similar to a UNION ALL of the events_day1, events_day2, etc.

Step 6: Configure a Service Account for BigQuery

  1. Access the “Credentials” section under “APIs & Services” in Google Cloud.
  2. Create a new service account, granting it necessary permissions (e.g., BigQuery Data Viewer, BigQuery Job User).
  3. Download the service account JSON file containing credentials.

Step 7: Connect Zing Data to BigQuery

  1. Log in to Zing Data.
  2. Connect Zing Data to your Google BigQuery project using the service account details.
  3. Select the desired datasets and tables

Step 8: Craft Data Queries with Zing Data

  1. From the Zing Data home screen, click on the events view you created in step 5
  2. Leverage natural language to generate queries for your GA4 data by typing in the search bar at the top.
  3. Access these queries via your mobile device for on-the-go insights.
  4. Combine queried data to create meaningful dashboards and visualizations by adding questions to a dashboard.
  5. Set up real-time alerts based on specific data thresholds by tapping the top right three dots on any question with a time series.

Conclusion

By connecting Google Analytics 4 with BigQuery and Zing Data, you’ve unlocked a powerful mechanism for harnessing insights from user behavior with the flexible power of natural language querying, SQL, or easy visual querying with SwiftQuery.

This integration empowers you to analyze trends, track performance, and make informed decisions for your business, all while enjoying the convenience of natural language query generation, mobile access, and real-time alerts. Best of all, the free tiers offered by BigQuery and Zing Data make this powerful capability accessible to businesses of all sizes.

Note:

Setting up Google BigQuery with Zing must be done using the Zing Web Console.