We use cookies. You have options. Cookies help us keep the site running smoothly and inform some of our advertising, but if you’d like to make adjustments, you can visit our Cookie Notice page for more information.
We’d like to use cookies on your device. Cookies help us keep the site running smoothly and inform some of our advertising, but how we use them is entirely up to you. Accept our recommended settings or customise them to your wishes.
×

Intro to GA4: Data Studio Integration

Intro

Advanced reporting through custom data visualization is a common next step after implementing any analytics tracking solution, allowing you to create more flexible reports than the built-in or custom reporting functionality within the platform may be capable of. For many, Google’s Data Studio provides a powerful, free dashboarding service to address this. As more companies migrate from Universal Analytics to Google Analytics 4, it is time to look at how reporting can be done using GA4’s Data Studio Connector. Here, we will walk through how to use the connector to bring your GA4 data into Data Studio and create a quick, executive dashboard which demonstrates each of these differences with visualizations that answer the following questions:

  • How are our KPIs performing by platform?
  • How is the checkout journey performing?
  • What is the most common payment type?

For this walkthrough, we’ll be using Google’s Flood-It and Merchandise sandbox accounts. The Flood-It account tracks interactions with Google’s Flood-It game across a site and two apps, whereas the Merchandise account tracks interactions on a predominantly web-based ecommerce site.

Bringing GA4 Data into Data Studio

As with standard Universal Analytics data sources, we can add a GA4 data source to Data Studio by selecting Google Analytics from the list of Google’s native connectors.

Data Studio has native connectors with many platforms, GA4 included.
Data Studio has native connectors with many platforms, GA4 included.

 

Search for your account and property using the bar on the left. GA4 properties do not have views, so we select the entire property to add it to the report.

Unlike Universal Analytics data sources, GA4 data sources are linked by Property.
Unlike Universal Analytics data sources, GA4 data sources are linked by Property.

Viewing GA4 Event Performance by Platform

The first question we want to answer is “How are our KPIs performing by platform?” We'll start with basic, built-in metric, the total number of new users.

To answer this, we simply create a new scorecard widget, and set the metric field to New Users.

Creating a scorecard widget.
Creating a scorecard widget.

As mentioned above, a GA4 property can combine data from multiple platforms. We can split these new users out into web users and app users as follows:

  • Duplicate the existing widget
  • Click Create filter
  • Set Platform = web
  • Apply filter

We can then do the same for app, excluding all web data.

Using the Platform dimension to filter data
Using the Platform dimension to filter data

We can also view the proportion of user across each platform, for instance by creating a pie chart where dimension is platform.

Using the Platform dimension to segment data
Using the Platform dimension to segment data

If your KPI is a custom event, you can filter for it in a similar way. Here, one of the KPIs is an event called level_complete. We can do this by selecting event count as our metric, and filtering for the Event Name we need.

Filtering for a GA4 event in Data Studio
Filtering for a GA4 event in Data Studio

Converting A Series of GA4 Events into A Checkout Funnel

The next question we want to answer is “How is the checkout journey performing?

We can use the below CASE statement to group our data into different steps of the checkout journey.

CASE

WHEN REGEXP_MATCH(Event name,"add_to_cart")

THEN "01. Cart"

WHEN REGEXP_MATCH(Event name,"add_shipping_info")

THEN "02. Billing & Shipping"

WHEN REGEXP_MATCH(Event name,"add_payment_info")

THEN "03. Payment"

WHEN REGEXP_MATCH(Event name,"review_order")

THEN "04. Review Order"

WHEN REGEXP_MATCH(Page path,".*\\/ordercompleted\\.html")

THEN "05. Order Complete"

ELSE "Other"

END

This code uses regex to look for and re-label each of the events fired during the checkout process. This is possible since all events, including pageviews, are classified the same way in GA4. Observe that we are able to reference a number of different events in the same widget and have even referenced a parameter of the page_view event for this last step, order complete. At the bottom, we group the rest of the events under Other so they can be more easily filtered out of the widget.

All of our available dimensions and metrics, with notes next to Event Scoped Custom Dimensions
All of our available dimensions and metrics, with notes next to Event Scoped Custom Dimensions

 

Click the pencil by the side of the data source to review it. This will bring up a pane showing the full list of fields we have brought into the report. This includes built-in dimensions and metrics, along with any parameters you have set up as custom dimensions from within the GA4 interface.

Here we can add this formula for our new dimension field.

Here’s what we see once we save this and add it to a new bar chart widget.
Here’s what we see once we save this and add it to a new bar chart widget.
Applying our checkout steps logic as a calculated field
Applying our checkout steps logic as a calculated field

 

We can clean this up by removing the events we don't need. Fortunately, we grouped these under Other earlier, so we can simply filter this out here to get a widget that shows each of our checkout steps.

Filter out Other et voilà, we have a checkout funnel
Filter out 'Other' et voilà, we have a checkout funnel!

Reporting on GA4 Parameters in Data Studio

For our final question, “What is the most common payment type?”, we'll take a look at custom dimensions in GA4. We can start by creating a table of Event Name against Transactions. We can see that transactions are mainly associated, as you might expect, with the ‘purchase’ event, and filter just for this to refine the table.

Looking in GA4, the purchase event has a number of parameters associated with it, such as ‘transaction_id’, ‘shipping_tier’ and ‘payment_type’.

We are lucky that, since these three parameters have already been set up as custom dimensions in GA4, we can pull them through as fields in Data Studio. It looks like ‘payment_type’ is the one we need.

We can search for it in the list of fields and add it to our table simply by dragging and dropping.

Set up your GA4 parameters as custom dimensions and use them in Data Studio
Set up your GA4 parameters as custom dimensions and use them in Data Studio

 

To see the proportions more easily, we can also try copy and convert this widget from a table into a pie chart.

Convert widget types direct from the menu.
Convert widget types direct from the menu.

 

We can see that Pay with Credit Card it the most common payment type. We can also see that this parameter value is being unnecessarily split, into “Pay with Credit Card” and “Pay with Credit card”, something we can get back to the developer team to mend.

And with that, we have our executive dashboard, answering the three questions we started out with, each demonstrating a key difference between GA4 and Universal Analytics.

From here we can continue to style and edit, then share with key stakeholders.

Our finalized dashboard.
Our final GA4 dashboard.

Summary

In this blog we have covered some of the key changes to the Google Analytics - Data Studio connector under GA4 and walked through some new ways we can use this data. I hope that by keeping the three examples above fairly generic you can easily apply what you have learned to your own account and use-cases.

If you’d like to know more about anything covered in this blog then get in touch, or if you’re looking for help getting started with a GA4 or Data Studio project of your own, you can reach out to our team of experts at https://www.merkleinc.com/emea/contact.

For all blogs in our GA4 series, please see below: 

1. Intro to GA4: Universal Analytics Versus GA4

2. Intro to GA4: Cross Data Stream Reporting

3. Intro to GA4: Advanced Analysis with Explorations

4. Intro to GA4: Data Studio Integration

5. Intro to GA4: Ecommerce in GA4

Join the Discussion

Get instant blog updates by email.