How to map Growth in Google Analytics sessions by Country in Data Studio

Google Data Studio has always had the ability to add in a comparison column to tables, but not to map out a change in values on a map. Ideally I would want to be able to see which countries have seen the highest rates of growth over a period of time. This is a method that worked for me and hopefully it will be useful for you too!

In this post I’ll show a method for how to map Growth in Google Analytics sessions by country using Google Data Studio.

Below is a video showing what the end result would be of using this method to map growth or the decline in the number of Google Analytics sessions.

Step 1: Create two Data Extracts from Google Analytics with different date ranges

So using this method we need to use the Data Studio Extract Data connector to create TWO different data sources.

The first data extract has the date range;
TODAY minus 60 days – TODAY minus 31 days.

The second data extract has the date range;
Last 30 days (including today).

map Growth in Google Analytics sessions

Once you’ve created these two extracts, name them something appropriate as shown below. I’ve named them ’60 – 31 GA’ and ’30 – 0 GA’ to indicate the days contained and the Google Analytics source of the data.

Step 2: Blend your two Extracted Data Sources together

The next step is to blend our data sources together. Click on Resources and then click Manage blended data.

Join keys = Country
Metrics = Sessions

Rename the Sessions for each data source so you’ll know which is which. I’ve renamed them 60 – 31 sessions and 30 – 0 sessions.

map Growth in Google Analytics sessions

Step 3: Create two Calculated fields showing Change and Change %

So in our tables and map we need to create two calculated fields.

Change = SUM(30 – 0 Sessions)-SUM(60 – 31 Sessions)
Change % = (SUM(30 – 0 Sessions)-SUM(60 – 31 Sessions))/Sum(60 – 31 Sessions)

If you want to replicate change % formula it is = (new_value-old_value)/old_value.

Change = SUM(30 - 0 Sessions)-SUM(60 - 31 Sessions)
Change % = (SUM(30 - 0 Sessions)-SUM(60 - 31 Sessions))/Sum(60 - 31 Sessions)

I’ve created these calculated fields for the table in the Data Studio report. For the map in the Data Studio report you’ll need to recreate the same calculated fields.

On the map below Country is the dimension, the metric is Change and Change %, 30 – 0 Sessions, and 60 – 31 Sessions are optional metrics.

map Growth in Google Analytics sessions

Step 4: Comparing your data to normal Google Analytics data

So an important question to ask is whether the data we get from these two extract data sources matches data we would normally get from Google Analytics?

So I added in another extracted data source based on Google Analytics data. This includes the dimensions country and (importantly) Date and has the date range for the full 60 days to 0 days.

If we compare the two side by side we see that they are almost identical in terms of numbers. This we could attribute to the refresh schedules of the extracted data sources.

An issue is that the total number of sessions as well as the total number of countries listed are different. This is because while the regular Google Analytics data includes only countries that had at least 1 session in the past 30 days the blended data includes countries that had 1 session in the 60 – 31 days too. So a small difference that causes different totals that you should be aware of.

Step 5: Using the Data Studio report

Below is the actual Data Studio report you can interact and play around with.

My Other Blog Posts

I hope you found this blog post about how to map Growth in Google Analytics sessions useful and interesting. You might enjoy some of my other blog articles.