Quantcast
Channel: Online Metrics
Viewing all articles
Browse latest Browse all 128

Step-by-Step Guide to Link Your Google Analytics 4 Property to BigQuery

$
0
0

Do you want to get access to all your raw Google Analytics data starting from today? Learn how to seamlessly connect Google Analytics 4 (GA4) to BigQuery!

Hit-level data is now not only accessible anymore for GA360 (paying customers).

Literally in minutes everybody can set up an integration between the brand new Google Analytics 4 (GA4) property, previously called Google Analytics App + Web, and BigQuery!

GA4 - BigQuery IntroIn this post I will list all steps to get started with the BigQuery integration and unlock advanced optimization capabilities!

Table of Contents

Let’s dive right in!

Why BigQuery is a Real Game Changer

Probably most of you have already heard about BigQuery. Learn the basics of digital analytics and data analysis first if you are very new to Analytics.

You really want to expand your skills in this area if you and the organization you work for are already leveraging Analytics data in various ways. Going beyond the reporting (and analysis) interface of GA4 can bring a ton of additional insights.

“There are no billing charges associated with exporting data from a Google Analytics 4 property to BigQuery. You can export to a free instance of BigQuery (BigQuery sandbox). However, exports that exceed the sandbox limits incur charges.”

BigQuery provides unlimited advanced analysis options.

A couple of advantages and use cases are listed below:

  • No sampling
  • Unlimited amount of dimensions
  • Calculate aggregated goal completions
  • Build your own Channel Grouping
  • Correct data errors on past data
  • Combine Google Analytics data with third party data sources
  • Use native BigQuery connectors to push data into advanced visualizations tools

You need to set up a GA4 property first before the integration can be enabled.

Setting up a Google Analytics 4 Property

Here is a quick tutorial on how to create a Google Analytics 4 Property.

Prerequisite: Edit-level access to the Google Analytics account where you want to create a GA4 property.

Edit account permissions in GA

Step 1: navigate to the admin interface of Google Analytics.

Admin interface Google AnalyticsStep 2: click on “Upgrade to GA4”.

Please note that the upgrade for GA4 only applies to users of Firebase for Mobile Apps. For current Google Analytics users, there is no planned ability to carry over historical data from Universal Analytics to Google Analytics 4. This means the upgrade refers to implementing the tracking code side-by-side with your existing Google Analytics (Universal) properties.

Step 3: click on “Get Started”.

Upgrade to GA4 - Get Started

Step 4: click on “Create Property”.

Upgrade to GA4 - Create Property

“If your site uses the gtag.js tag, you’ll have the option to Enable data collection using your existing tags. However, if you’ve implemented any custom tags for your Universal Analytics property, this option won’t replicate the functionality for your Google Analytics 4 property.”

Step 5: explore the “Setup Assistant” and implement the GA4 Configuration Tag (via GTM).

GA4 Property - Setup Assistant

This is how a basic GA4 Configuration Tag looks like:

GA4 Configuration Tag Example

The great thing is that you can add this GTM Tag to the same container as where all your Universal Analytics tags are running.

Note: the Setup Assistant will take you to all the necessary steps to get up and running with GA4. This blogpost focuses primarily on the Google Analytics 4 – BigQuery integration. I recommend working through the official setup docs from Google if you need extra support with the initial, basic setup of a GA4 property.

Linking a GA4 Property to BigQuery

As you probably have noticed, the BigQuery link has popped up under “Product Linking”.

Step 1: click on “BigQuery Linking” under “Product Linking”.

Product Linking - BigQuery LinkingStep 2: click on “Link”.
BigQuery Linking - Link

Step 3: create a new BigQuery project if not yet done.

Create a link with BigQuery

  • Click on “Learn more” if you need to create a BigQuery project first.
  • Click on “Choose a BigQuery” project if you have your project already created.

Step 4: link to a BigQuery Project.

Link to a BigQuery project

Step 5: click on “Confirm” in the top right corner after selecting your project.

Confirm BigQuery project

Step 6: select the Google Cloud region for your data when you set up an export.

Choose Data location

Data location is important especially in the light of GDPR, privacy etc.

Also, (potential) cost per region may vary so choose wisely.

Note: If your Cloud project already contains an export dataset, then you cannot change this setting. If you want to change the region for the dataset, you need to delete the existing BigQuery link and create a new one.

Step 7: select the data streams and frequency setting.

BigQuery - Data streams and Frequency

  • If you have a mobile app as one of your data streams, you can also choose to export the mobile advertiser identifiers.
  • I highly recommend choosing Daily and Streaming export.
    • BigQuery streaming export makes fresher data for the current day available within a few minutes (or even seconds) via BigQuery Export.
    • Additional costs should be very low, learn more here.

Step 8: click “Submit” if everything looks good to you.

BigQuery Linking - Submit

Step 9: enable the BigQuery API.

This is the API that connects Google Analytics 4 to BigQuery.

  • Log in to the Google APIs Console and select your project.
  • Navigate to the APIs table.
  • Open the Navigation menu, click APIs & Services, then click Library.

BigQuery - API Enabled

Last thing to do is to verify that you’ve added a service account to your Cloud project.

Verify that firebase-measurement@system.gserviceaccount.com has been added as a member of the project, and given the primitive role of “editor”. Add the account if necessary.

Create service account

This is what it looks like in Google Cloud:

Service account details

Now your API and connection are ready.

Step 10: wait one day.

Wait until the next morning (some people need to wait a bit longer), then go to your BigQuery project. You will now see your raw Google Analytics data from Google Analytics 4.

BigQuery Overview Start

Note: data is only exported from the date of enablement, not retroactively.

Step X: delete your link to BigQuery (obviously, only do so if you have a good reason).

You can, for whatever reason, delete your link to BigQuery.

Go to the BigQuery Linking page.

BigQuery Linking - Overview

Click on “Delete” in the top right corner.

BigQuery Linking - Delete

Your First Query

Getting started isn’t easy if you don’t know BigQuery and SQL. There are a ton of resources available to help you get started with BigQuery.

Also, I expect a lot of awesome tutorials about BigQuery and Google Analytics 4 to be published in the near future!

I recommend checking out these resources to get started:

This is it from my side. I hope this post supports you in setting up your newest integration with BigQuery!

Now it’s your turn! Are you already leveraging BigQuery and GA4 and do you have any tips to share?

One last thing... Make sure to get my automated Google Analytics Audit Tool. It contains 25 key health checks on the Google Analytics Setup.

Get Free Access to The Google Analytics Audit Tool

The post Step-by-Step Guide to Link Your Google Analytics 4 Property to BigQuery appeared first on Online Metrics.


Viewing all articles
Browse latest Browse all 128

Latest Images

Trending Articles





Latest Images