How GA4 Integrates with the Google Cloud Platform

Will Rice
First published April 12th, 2023
Last updated October 31st, 2023
Discover how integrating Google Analytics 4 with the Google Cloud Platform can help you build better marketing infrastructure.
How GA4 Integrates with the Google Cloud Platform

Google Analytics 4 (GA4) is a powerful tool. But to gain even deeper insights, we need to go a step further. Today, we’ll be looking at Google Analytics 4 integration with the Google Cloud platform, and how BigQuery can give you the answers you need.

This is a write-up of the talk given by Glenn Schmelzle at GA4ward MKII. You can find his slides here, and the recording is below too:

 

The key to better marketing is controlling acquisition costs

Why are marketers trying to improve how they run their programs? Simply put, because it’s costly to find new customers.

controlling acquisition

Above, you’ll find an example set of charts often used by finance people. We start with a big revenue bar and take away slices for different cost components. You can imagine this for one unit of a particular product, or for your whole company. But you can’t take away more revenue than you have.

Sometimes marketing is fuzzy and we don’t have an idea of what we’re spending. In this situation, we might find that on an individual basis, we are eroding a profit away.  If we can get the cost to be predictable, we should be able to preserve profit. 

 

But there’s one problem…


Transaction

 

There’s a lot of math involved. Let’s imagine that your B2B or direct-to-consumer business has a high ticket item. In this scenario, you’ll need to break down the value of the interactions that make their way down to a final transaction.

For instance, let’s look at the example shown in the image above. If you’ve won a piece of business worth $1000 as a unit of revenue, and your cost is $300 you gain $700 gross profit.

But there are other stages that we need to look at. In the world of sales and marketing, we’re interested in the leads and the number of engaged visitors. This needs to be practical math too, but this isn’t easy.

 

Root cause: infrastructure is built wrong


Root cause

What’s the problem? Our systems are not built in the right way. They go horizontally, but the performance we’re measuring goes vertically. But there is one useful piece of information here. You’ll see from the image above, that Google Analytics 4 (GA4) is on the ‘visits’ band. This is key to fixing the issue.

 

Marketing maturity model

 

Remember, the people who made GA4 are working to make marketing go much further than before. They commissioned the Boston Consulting Group to do a study. The results of this were interesting. It said that, according to how marketing should be done, tools should enable us to move from the nascent use of analytics in our marketing through to multi-moment use.

Sadly, in your average organization, people are struggling to move beyond the nascent stage. But what if there was something that could vault you forward on this curve? What’s more, what if that tool was free? Well, good news, GA4 can be the answer to your problems! 

 

GA4, BigQuery & Google Cloud

 

BigQuery

 

We’re largely not talking about the GA4 shown in the top image. That’s an interface, where you go to build reports. We’re talking about the other side of GA4, which exports data into Google Cloud. More specifically, we’re talking about one of the jewels in the crown of Google Cloud, Big Query.

 

BigQuery

 

We need to consider GA4 as a piece of something much larger. We, outside of Google, are only able to see what’s above the waterline. To us, GA4 is presented as an independent stand-alone product. But for anyone that runs Google Ads, we know that GA is not a standalone product. 

Think of BigQuery and Google Cloud as a group. They have a lot of tight integrations and features purpose-built for GA4.

 

A day in the life of a data warehouse 

Think of a data warehouse as a place where information is put. But unlike a normal warehouse, where it takes time to find what you need, a data warehouse gives you access at lightning speed. It’s able to do that thanks to a tool that has been in the IT field for a very long time. That tool is the standard query language (or SQL).

But whilst this is a well-worn tool, the type of information that we are inputting is new. If we can bypass the GA4 interface and go into BigQuery, there will be some payoffs. So, how do you manage Google Analytics 4 integration with the Google Cloud platform?

 

What you need to start with BigQuery

If you’ve already got GA4 installed, you could be looking a BigQuery data tomorrow. But how do you do that? Follow the steps listed below.

  • Create a free Google Cloud account.
  • Administrative considerations.
    • How is billing done? – Consider if the account already exists vs needs to be created.
    • Highly permission-based – think about who needs access to what.
  • Google data exports (Analytics, Ads, GSC) – assign your data region with care. Where will the physical server that hosts your data be located?

Remember, it isn’t only GA data that can go into BigQuery. It’s also possible with Google Ads and Google Search Console too. 

But what about internal systems (like marketing automation, CRM, and Marketo)? These programs both can and should put data into BigQuery. A simple way that you can do that is to have your own ETL provider. These will handle the application program interfaces and ensure your data shows up.

 

Intimidating but powerful interface

But what do we get once we’re inside BigQuery? The first thing you’ll probably notice is the interface.

Intimidati

 

Above you can see the setup within the BigQuery section of Google Cloud. Starting from the left-hand side, we are looking at a whole slew of data sources within a single data set. We can gain an understanding of how data is being used and where it’s hosted. BigQuery can handle petabytes of information. But it’s still important to know how much data we’re using. 

Finally, in the right-hand column, we can find an SQL statement. We can input a query and quickly get a result back.

But as marketers, this isn’t the area of BigQuery that we’ll be looking at. To properly make use of the Google Analytics 4 integration with Google Cloud, we’ll need some new skills. Some of these skills are listed below: 

Concepts

  • Extract/Transform/Load
  • Data Formats
  • Moving info into/out of Databases
  • Schemas
  • Joins (aka Blends) between tables
  • Command-line Shells, Notebooks

Programming

  • Basic Python (some say R)
  • Structured Query Language (SQL)
  • JSON

 

All roads lead to BigQuery


All roads lead to BigQuery

 

This is how it may look once everything is put together. BigQuery is bringing all the data together from tools like GA4. Inputing data can be as regular as a daily occurrence. As mentioned earlier, we can also have data coming from third-party sources via an ETL.

BigQuery

 

Let’s go back to the graph we showed earlier. Data was being measured horizontally, rather than vertically. Consider how information is being moved from one source to another. For example, if we’re using Microsoft Advertising we need to be adding UTM parameters to our URLs. When users click these, data is filtered into GA4.

If that information is then going into BigQuery, we can start looking vertically at our data. It isn’t being siloed into horizontal containers anymore.

 

Dashboards are a step in the right direction 

With all the information that we’re gathering, we can start making dashboards. Luckily, there’s a product that can help us with this, Looker Studio (formally known as Google Data Studio). Below is a partial list of visualizations you can create using this tool.

  • Channel mix
  • Nurturing activity effectiveness
  • Lead/opportunity qualification
  • Pipeline velocity
  • User journey analysis
  • Attribution modeling
  • Customer Lifetime Value (LTV)
  • Retention and churn predictions

Google Data Studio is highly portable. It allows you to send interactive dashboards or PDFs around your company.

 

Industrial chemical client example


Client example

 

To give you an idea, let’s look at the client example (with some information redacted). You can start to show some instantly refreshed charts and graphs about your marketing performance. This includes how it’s doing, what’s working, and how things are being distributed.

 

Dashboard

 

If you put data together in the right way, you can start to compare social vs search ads. For example, you might say ‘did my first ad get better conversion rates on Linkedin, or on Google?’. You can start to see how your imagination becomes your guide in regard to your dashboards. You aren’t limited in the way that you are on traditional platforms. 

 

Each tool only sees what’s running on its track

There is a small proviso. We are starting to get into attribution issues. The information you receive is a function of the information that the tool has access to. Let’s imagine that one Google click resulted in a sale. This is good news. But if the tool wasn’t aware of a buyer’s activity on platforms such as Facebook and LinkedIn, it won’t have the full information.

If you want to get a full picture of buyer behaviour, you need to make sure you feed in the right information.

 

Train AI by sending back conversion events


Conversion events

 

Another thing to bear in mind is the question of when we’re getting conversions. We talk about the importance of getting information from different channels, regardless of whether a sale was made. This is data that we need feedback on even if it goes against the flow of where our user is going.

For example, in the Google world, you may want to look at a GCLID. Or if you have someone coming into your SaaS tool, you’ll receive a USERID. You can start feeding these none personally identifiable pieces of information back to the platform.

This is a good way to get a straightforward connected step on our maturity curve. But if we’re really going to kick this into high gear, we need to consider the deeper signals that ad platforms are starting to use. This is where BigQuery excels.

 

Ad platforms need deep signals

Why do ad platforms need deeper signals? Information from an individual conversion only gets you so far. The ad platforms are not looking at historical information but instead are forward-looking. This requires massive amounts of data, this includes data that we don’t have.

If marketers don’t tie into these platforms, we’re not giving them the information that they need. This means that aren’t understanding which audiences or individuals are valuable to them. Without that information, their spending will be unrestrained and not as intelligent.  

So, we need to think about the kind of answers that we need. We should be getting answers to some of the following questions:

  • What attributes best predict audience behavior?
  • Which people have the highest propensity of buying if they see an advert?
  • Which people have the highest propensity of buying if they DON’T see the advert?
  • Where can I find more like them?

 

Why results get better with AI

When we feed ad platforms data, they start making predictions. These will become more accurate over time, as the tool establishes a feedback loop. They can determine whether their predictions were right or wrong. 

In artificial intelligence (AI) we call this training the model. Each tool has a different device that powers machine learning. For instance, BigQuery uses BigQuery ML. These devices work to massage audience information to bring them into the tools where they influence bidding.

But remember, each tool favors its own information. For example, Google Ads thinks you only need to send information back to Google Ads. For this reason, you might want to give these tools some audiences to exclude. 

For instance, let’s say there is a customer who only buys once a year. There’s no point trying to market to them if they’ve recently bought a product similar to yours. It doesn’t matter whether it’s Google or another platform. You have to be responsible for knowing whether you’re going into their territory or into another realm.

Out of BigQuery and into…

 

Out of BigQuery and into

As mentioned earlier, all roads lead into BigQuery. But they also lead out of BigQuery into both Google and none Google ads platforms.

 

Strategies to think about

As we wrap up, it’s a good idea to think about a couple of strategies. Firstly, you should consider exporting Universal Analytics (UA) data if you need it. You’re probably wondering ‘why?’. Most companies want to see month-over-month, quarter-over-quarter, or year-over-year periods. Merging this data and reporting in BigQuery is a lot easier than trying to do it in another tool.

It also depends on when you set up GA4 for collecting data. If you’re doing long period-over-period reporting, and you’ve only just started collecting data in GA4, you will need UA information. This will bridge the gap beyond July 1st, 2023 until all data in your trend reporting is in GA4.

Secondly, if you need to report trends for MoM, QoQ, and YoY periods, ask what unique IDs are passed between internal systems. This will determine how you blend records and show end-to-end funnel insights.

 

In Closing

View the Google Analytics 4 integration with Google Cloud as a chance to try new things. Don’t worry – you won’t break anything! This is an opportunity to live up to the things that you’ve always wanted to do in marketing.

 

Further Reading

Want more? Check out our blog for tips on Google Analytics, GTM, and a whole host of other Google packages.

 

About Glenn Schmelzle

Glenn Schmelzle, BA, MBA is a marketer, husband, hockey dad, and data collector. In 2005 he started using what became Google Analytics, becoming certified in every version, including GA4. This, and a desire to help companies in their paid marketing, led him to open Marketing What’s New in 2013 and the Funnel Reboot podcast shortly after. He has been using the Google Cloud Platform as part of his marketing analytics work since 2020.

Glenn schmelzle

Will Rice
Follow me
0 0 votes
Article Rating
Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Comments
Inline Feedbacks
View all comments
Articles from our Blog
0
Would love your thoughts, please comment.x
()
x