Here are the basic steps for blending Universal Analytics and GA4 data into the same chart in Looker Studio. Most of this is just knowing how to use data blends, but there are a few parts specific to the UA/GA4 use case that may save you some time.
Note of caution: be careful when combining metrics that UA and GA4 calculate differently (Users, sessions, bounce rate, etc). It’ll work, but your visualization may tell a misleading story. Hit-based metrics like pageviews and events should be more consistent.
We’ll join the two data sources on a shared dimension (eg, a date dimension), add date filters in the data blend to specify the cut-off date between UA and GA4, and use calculated fields to merge the data into single dimensions and metrics for our chart.
In this example we’re going to chart monthly pageviews across the UA/GA4 cut-off.
First, create two tables, one for the Universal Analytics data source, one for GA4. I’m using
Year month but you can use any date field where GA3 and GA4 have the same values. See the note below about an extra required step if you’re using the
Now we’ll create the blend. Select the two tables, right click > Blend data.
Next, change the join configuration to Full outer, so we get all of the rows from each table, and use your date field for the join condition.
Now we need to define the cut-off date between UA and GA4 so the data doesn’t overlap.
The first time I did this I used the Date range option within the blend configuration to specify the two date ranges. This works fine for a chart with a fixed date range, but it won’t be responsive to the date range control.
A better approach is to define your date ranges with a filter, which will allow the date range in your chart to inherit from the date range control or page settings.
Note: If you’re using the
Date field to join your tables you need to first create a custom Date field in your GA4 data source in order for the filter to work. (Thanks to Kuura Tuononen on Measure Slack for figuring this out.)
The field doesn’t do anything special, it’s just a wrapper around the default
And then you’ll use this custom date field as the join field in your blend.
Back to our original example, when we save the blend we’ll get a new table but it’s not doing what we want yet. Each data source has its own date and page view columns.
The last step is to create calculated fields in the chart for the date dimension and pageviews metric, using the
COALESCE function, which will merge the fields into one date dimension and one pageview metric.
Now we have our UA and GA4 data together in one chart.