AdWords is now Google Ads. Our new name reflects the full range of advertising options we offer across Search, Display, YouTube, and more. Learn more

Analytics
4.3K members online now
4.3K members online now
Dive into multiple domain (Cross/Sub) tracking, implementing Ecommerce and Enhanced Ecommerce, setting up Event tracking, and Universal Analytics code.
 
Guide Me
star_border
Reply

sampleRate is inaccurate?

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

I added a sample rate of 3% to a web property with a high number of events. However, the number of recorded events dropped to about 12% of typical numbers (from ~8M/day to ~1M/day). I expected it to drop to ~3% of typical numbers. Traffic and users to the site did not change.

 

Why is this the case? Is the sample rate configuration inaccurate? I know that it samples a subset of users—so in theory, a random sample could pick a group of users who tend to cause more events to fire—but our sample size of users is large enough that this shouldn't happen.

 

Our code looks like:

ga('create', 'UA-XXXXXXXX-X', {'sampleRate': 3});

 

Docs on sampleRate:

https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#sampleRate

 

 

 

1 Expert replyverified_user

Re: sampleRate is inaccurate?

Participant ✭ ✭ ✭
# 2
Participant ✭ ✭ ✭
Hi Kevin,

What was the sampleRate value before you changed it? Did you have the default value (100) before?

Taavi

Re: sampleRate is inaccurate?

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭
Yes. It was not explicitly set, so it was the default of 100.

Re: sampleRate is inaccurate?

[ Edited ]
Rising Star
# 4
Rising Star

Hey Kevin,

Did you compare this against the actual? That is, did you run this in another tracker? I can't recall how the sampling is set, that is by session or by hit. If it is by session then that could easily explain the difference as some sessions with higher event counts than normal could have been included in the sample.

Even if it's by hit, it could explain it depending on your mix of pageviews, events, transactions, measurement protocol pushes, etc.

 

Edit:  It's actually user based.  3% of users in your case.   More here:

 

https://support.google.com/analytics/answer/2637192?hl=en

 



Lastly, if you have that much data you are not getting all of your data processed intra-day and may have to wait to get the most accurate picture.

Best,

Theo Bennett



Analytics Evangelist at MoreVisibility | Contact Me
Connect on LinkedIn

Re: sampleRate is inaccurate?

Visitor ✭ ✭ ✭
# 5
Visitor ✭ ✭ ✭
Theo, thanks for the reply.

It's been a week since we made the change, so it's not a problem of lagging analytics.

Yes, I see that the sampling occurs on a per-user basis. However, we're sampling from about 70k daily active users, so it would be fairly unlikely that the randomly selected 2,000 users would, by chance, fire an average of 4x as many events than the typical user.

No, unfortunately, we weren't able to compare this sampling tracker to one without any sampling. However, our daily event counts before the change are very consistent, so we have a pretty good idea of the "baseline" numbers without any sampling.