Sampling when querying custom variable even with less than 500.000 sessions

126 views
Skip to first unread message

Jerry W

unread,
Nov 18, 2014, 5:40:11 AM11/18/14
to google-analytics...@googlegroups.com
Hi,

I'm still using classic google analytics. I'm using a custom variable.

When I send a query with ga:customVarValue1 in the filters-section or as a dimension I get sampled data even  when querying just one day.
The amount of sessions of this day is far less than 500,000 (as mentioned on https://developers.google.com/analytics/resources/concepts/gaConceptsSampling).
The google-account I'm using has 20+ analytics-accounts. Each of them has 1-5 properties with 1-5 views. Is this the cause of the sampling problem?

Any other idea why I get sampled data?

TIA,
JW

Kushan Shah

unread,
Nov 18, 2014, 9:04:54 AM11/18/14
to google-analytics...@googlegroups.com
Hi Jerry,

Can you post the full query that is being sampled? Are there any other dimensions apart from ga:customVarValue1 in the query?

Jerry W

unread,
Nov 18, 2014, 10:22:13 AM11/18/14
to google-analytics...@googlegroups.com
I'm using Query Explorer:

dimensions: ga:date,ga:customVarValue1
metrics: ga:users
filters: ga:customVarValue1=~[56789]
start-date: 2014-11-13
end-date: 2014-11-13

Even when I don't use filters or set the filters and set dimensions to ga:date I get set sampled sampled.
Message has been deleted

Jerry Who

unread,
Nov 18, 2014, 11:59:55 AM11/18/14
to google-analytics...@googlegroups.com
But I don't understand why sampling is an issue at all: there are less than 500,000 sessions in this property. So to my understanding there's no reason for sampling.

Am Dienstag, 18. November 2014 schrieb Pete :
This is likely because the Default sampling level is being used for the Query Explorer.

You can submit a feature request for this parameter to be added as a configurable option of the Query Explorer. See the help section on GA Demos & Tools for links to GitHub where you can open a new issue:

--
You received this message because you are subscribed to the Google Groups "Google Analytics Reporting API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-analytics-data-...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Pete

unread,
Nov 20, 2014, 11:19:57 AM11/20/14
to google-analytics...@googlegroups.com
ah, I misread the question.

Can you share the request and response you're getting? I suggest you use the APIs Explorer (https://developers.google.com/apis-explorer/#p/analytics/v3/analytics.data.ga.get) to get this information (the data in the response isn't needed).
To unsubscribe from this group and stop receiving emails from it, send an email to google-analytics-data-export-api+unsubscribe@googlegroups.com.

Jerry W

unread,
Nov 21, 2014, 2:51:27 AM11/21/14
to google-analytics...@googlegroups.com
Hi Pete,

I hope that's what you're asking for:

GET https://www.googleapis.com/analytics/v3/data/ga?ids=ga%3A46005136&start-date=2014-11-13&end-date=2014-11-13&metrics=ga%3Ausers&dimensions=ga%3Adate%2Cga%3AcustomVarValue1&filters=ga%3AcustomVarValue1%3D~%5B56789%5D&key={YOUR_API_KEY}

Authorization:  Bearer XXXXXXXXXXXXXXXXXXX
X-JavaScript-User-Agent:  Google APIs Explorer

{
"kind": "analytics#gaData",
"query": {
"start-date": "2014-11-13",
"end-date": "2014-11-13",
"ids": "ga:46005136",
"dimensions": "ga:date,ga:customVarValue1",
"metrics": [
"ga:users"
],
"filters": "ga:customVarValue1=~[56789]",
"start-index": 1,
"max-results": 1000
},
"itemsPerPage": 1000,
"totalResults": 4,
"profileInfo": {
"profileId": "46005136",
"accountId": "23380416",
"webPropertyId": "UA-23380416-1",
"internalWebPropertyId": "45806927",
"profileName": "www.textilwirtschaft.de IS",
"tableId": "ga:46005136"
},
"containsSampledData": true,
"sampleSize": "30061",
"sampleSpace": "36299",
"columnHeaders": [
{
"name": "ga:date",
"columnType": "DIMENSION",
"dataType": "STRING"
},
{
"name": "ga:customVarValue1",
"columnType": "DIMENSION",
"dataType": "STRING"
},
{
"name": "ga:users",
"columnType": "METRIC",
"dataType": "INTEGER"
}
],
[results following ........]

As you can see the report contains sampled data.

Cheers,
JW

Jerry W

unread,
Nov 24, 2014, 10:03:56 AM11/24/14
to google-analytics...@googlegroups.com
Hi Pete,

do you see any reason why I get sampled data here?

Cheers,
JW

Jerry W

unread,
Nov 25, 2014, 9:19:03 AM11/25/14
to google-analytics...@googlegroups.com
Once again me :-)

If I understand the output correctly


"containsSampledData": true,
"sampleSize": "30061",
"sampleSpace": "36299",

means that 36299 sessions exist for this special date and 30061 of them are used for the statistics.

But when I remove ga:customVarValue1 from the dimensions and also remove the filter I get not sampled data with
33849 users or 36299 sessions.
That's well below the 500,000 sessions mark of https://developers.google.com/analytics/resources/concepts/gaConceptsSampling.


On Friday, November 21, 2014 8:51:27 AM UTC+1, Jerry W wrote:

Mike Sullivan

unread,
Nov 25, 2014, 1:02:53 PM11/25/14
to google-analytics...@googlegroups.com
I don't see where you included  samplingLevel=HIGHER_PRECISION 

Pete

unread,
Nov 25, 2014, 8:31:56 PM11/25/14
to google-analytics...@googlegroups.com
Still looking into this. Once I have more information I'll let you know.

Jerry W

unread,
Nov 26, 2014, 2:41:35 AM11/26/14
to google-analytics...@googlegroups.com
Hi Mike,


> I don't see where you included  samplingLevel=HIGHER_PRECISION 

that's right, I haven't used it because I'm using API 2.4 in my scripts where I can't set this parameter. But my question is why sampling is an issue after all because to my understanding it shouldn't because I'm not hitting the sampling limits.

Cheers, JW

Jerry W

unread,
Nov 26, 2014, 2:43:21 AM11/26/14
to google-analytics...@googlegroups.com
Hi Pete,


On Wednesday, November 26, 2014 2:31:56 AM UTC+1, Pete wrote:
Still looking into this. Once I have more information I'll let you know.


thanks a lot. I'm looking forward to hear from you.

Cheers,
JW

Jerry W

unread,
Nov 26, 2014, 2:50:52 AM11/26/14
to google-analytics...@googlegroups.com
Hi Mike,

using the API explorer and setting samplingLevel to HIGHER_PRECISION results still in sampled data :-(

Jerry Who

unread,
Dec 8, 2014, 11:45:24 AM12/8/14
to google-analytics...@googlegroups.com
Hi Pete,

just a shy question if you've got any new information?
I'm still struggling with this sampling problem.

Cheers,
JW
To unsubscribe from this group and stop receiving emails from it, send an email to google-analytics-data-...@googlegroups.com.

Pete

unread,
Dec 8, 2014, 12:38:55 PM12/8/14
to google-analytics...@googlegroups.com
Still investigating but hopefully there will be some info to share later this week. I'll follow-up with you.


On Monday, December 8, 2014 8:45:24 AM UTC-8, Jerry W wrote:
Hi Pete,

just a shy question if you've got any new information?
I'm still struggling with this sampling problem.

Cheers,
JW



Am 26.11.2014 um 02:31 schrieb Pete

Jerry W

unread,
Jan 23, 2015, 12:02:52 PM1/23/15
to google-analytics...@googlegroups.com
Hi Pete,

is there anything new about my sampling problem?

Best regards,
JW

Manuel deF

unread,
Mar 5, 2015, 3:09:07 PM3/5/15
to google-analytics...@googlegroups.com
Hi, I am having the same issue. Any update on this?
It would be really helpful

Thanks a lot
M 

Jerry W

unread,
Mar 6, 2015, 4:56:21 AM3/6/15
to google-analytics...@googlegroups.com
Hi Manuel,

great to hear that I'm not alone with this problem. But I haven't heart anything for 3 months. 

Cheers,
JW

Atish Haria

unread,
May 12, 2015, 10:54:28 AM5/12/15
to google-analytics...@googlegroups.com
I am having the same problem with custom variables. However, if you use the custom variable in an advanced segment then it will give you unsampled data (if less than 500,000). Don't know exactly why that would be the case.

Kannapiran R

unread,
Jun 25, 2015, 6:08:25 AM6/25/15
to google-analytics...@googlegroups.com
Even i'm facing the same sampling issue.

Any clue to retrieve full data.

Thanks,
Kanna
Reply all
Reply to author
Forward
0 new messages