Hey there, I'm Benjamin from Loves Data! Welcome back! In this video, we're going
to explore data sampling in Google Analytics. We're going to talk about what data sampling is,
the sampling limits in Google Analytics 4 (GA4) compared to Universal Analytics, and my number one
tip you can use to avoid sampling. So what is data sampling in Google Analytics anyway? Well, when
you open a report in Google Analytics, it takes time (and resources) to calculate the results
and present them in your reports. In some cases, Google Analytics will take a portion of the data
and use this to estimate the total. For example, let's say you look after a popular website,
you've created an exploration report in GA4 that is based on a lot of data. Instead of creating the
exploration report by querying all of the events that have been collected into the property, Google
Analytics might use half of those events and then provide an estimated total for the report.
Now Google Analytics only needs to calculate figures based on half of the data and the report
is quicker to load. Okay, so when does Google Analytics sample data? If you're using GA4, then
all of the standard reports will contain unsampled data. This means your reports are based on 100% of
the data that's been collected. Let's take a look at this by navigating to 'Engagement'...
And then 'Pages and Screens'... Now let's change the date range, let's select 'This Year'...
So we will be looking at the first of January to the fifth of December... And let's click
'Apply'... And now let's add a second dimension to the report. Let's click the plus sign...
And let's select 'Session Acquisition'... And then 'Session Campaign'...
This report is now showing us all the pages people have viewed along with the campaign
details they used to find the website. At the very top of the report there is a green tick...
And we can click this to see that the report is based on one hundred percent of the data that's
been collected. I also want to highlight that in the table we can see that there
are a significant number of events that have been used to create the report. We're getting
close to seven million page views. Now I want to show you what happens in Universal Analytics,
the previous version of Google Analytics. Let's open Google's Universal Analytics demo...
And let's navigate to 'Behavior'... Then 'Site Content'... And then 'All Pages'...
This is a similar report to the one we were looking at in GA4. Now let's change
the date range... Let's select the first of January... To the fifth of December...
And let's click 'Apply'...
Now let's add a second dimension to the report. Let's search for and select 'Campaign'...
Now at the top of the report we can see an orange (or yellow) shield icon. Let's click this...
And we can see that this report is sampled. It's based on data from just over sixty percent of
the sessions that were collected for the date range. So as soon as we have a larger
data set and we begin to customize things in Universal Analytics, sampling will be applied
to the reports. So this is one reason to start using GA4 if you're not already. And you can
run GA4 in parallel to Universal Analytics. If you would like to learn more about this,
then I've included a link to my getting started tutorial in the description below this video.
Before we head back to GA4, I also want to mention that with the free version of Universal Analytics,
sampling can occur when you have more than five hundred thousand sessions included in the
selected date range. So apart from the example we've just looked at, you are also likely to
encounter sampling when you apply segments to your reports, when you create custom reports in
the 'Customization' section, and when pulling data from Universal Analytics into Google Data Studio.
Now let's head back to Google's GA4 demo property... Let's select 'Explore'...
And I'm going to open an exploration report I've created called 'Paid Keywords'...
This report has a segment applied. It combines two dimensions, and two metrics. And the date
range is from the first of January to the fifth of December. On the top right corner
we can see an orange alert icon... Let's click this... It tells us that the report is based on
around fifty three percent of the data that's been collected, and that the report is sampled.
If you're using the free version of GA4, then data is sampled when your report queries more
than ten million events. Okay, now you might be wondering, how can you avoid data sampling?
My number one tip to avoid data sampling is to reduce the date range you use for your reports.
So let's change the date range used for this report...
Let's change the data range to the first of April to the fifth of December...
And let's select the alert... We can see that the report is now based on around seventy four percent
of the available data. Let's try reducing the date range one more time... Let's change it to
the first of July to the fifth of December... We can now see a green tick... And clicking this,
tells us that the report is now unsampled. So reducing the data range is a great way to reduce
sampling in your GA4 exploration reports. (And this tip also works for Universal Analytics too.)
For more tips you can use to reduce data sampling in GA4 and Universal Analytics, I've included a
link to my blog post in the description below this video. And apart from sampling, you might
encounter data thresholds. This is where Google Analytics hides information that could be used
to identify an individual based on demographics or other details. Let's navigate to 'Demographics'...
At the top of the report we can see the orange alert icon. Let's click this...
We can see that the data in this report hasn't been sampled, but a threshold has been applied.
This means that some information has been withheld to ensure people's privacy is maintained.
You will typically see this if you have a website that receives a small amount of traffic. Apart
from the alert, you will see 'unknown' listed in your reports when the threshold is applied.
Have you encountered data sampling in Google Analytics? What did you do to reduce sampling?
I'd love to know! Let me know in the comments below. And as always, if you found this video
helpful please like it so I know to make more videos like this one. Thanks for watching!