小时尺寸的GA总体结果明显少于日期尺寸 [英] GA total results is significantly less with hour dimension than with date dimension

查看:157
本文介绍了小时尺寸的GA总体结果明显少于日期尺寸的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的GA API运行两年以上的数据查询:
$ b $ p Query1:

<$ ()
.get(ga:+ profileId,
2013-03-08,$ b)获取apiQuery = analytics.data $ b2014-03-09,
ga:visits)
.setDimensions(ga:campaign,ga:keyword,ga:date)
.setSort(ga :campaign,ga:keyword)
.setFilters(ga:medium == cpc)
.setMaxResults(1000);

Query2:

 获取apiQuery = analytics.data()。ga()
.get(ga:+ profileId,
2013-03-08,
2014-
ga:visits)
.setDimensions(ga:campaign,ga:keyword,ga:date,ga:hour)
.setSort(ga: ga:medium == cpc)
.setMaxResults(1000);

唯一的区别是额外的小时尺寸。



第一个查询返回651322个结果
第二个查询返回91592个结果



这对我没有意义 - 我期望大约651322 * 24 = $ 15M结果将被返回。



有谁知道这是为什么?



感谢您的帮助,


解决方案

采样。


samplingLevel string no所需的采样级别。允许的值:

 •DEFAULT  - 返回具有平衡速度和准确性的样本大小的响应。 
•FASTER - 以较小的样本量返回快速响应。
•HIGHER_PRECISION - 使用大样本量返回更准确的响应,但这可能会导致响应速度变慢。


注意:如果我记得正确的话,API应该返回一些变量你的数据。它告诉你数据是被采样的:尝试寻找像containsSampledData,sampleSize或sampleSpace之类的东西。我不记得哪一个这是正确的这一分钟。

I am using the GA API running two queries over 1 year's worth of data:

Query1:

Get apiQuery = analytics.data().ga()
 .get("ga:" + profileId,
 "2013-03-08",
 "2014-03-09",
 "ga:visits")
 .setDimensions("ga:campaign,ga:keyword,ga:date")
 .setSort("ga:campaign,ga:keyword")
 .setFilters("ga:medium==cpc")
 .setMaxResults(1000);

Query2:

Get apiQuery = analytics.data().ga()
 .get("ga:" + profileId,
 "2013-03-08",
 "2014-03-09",
 "ga:visits")
 .setDimensions("ga:campaign,ga:keyword,ga:date,ga:hour")
 .setSort("ga:campaign,ga:keyword")
 .setFilters("ga:medium==cpc")
 .setMaxResults(1000);

The only difference is the extra hour dimension.

The first query returns 651322 results The second query returns 91592 results

This doesn't make sense to me - I would expect approx 651322*24 = 15M results to be returned.

Does anyone know why this would be?

Thanks for any help,

Josh

解决方案

It sounds to me like your data has been sampled.

samplingLevel string no The desired sampling level. Allowed Values:

 •DEFAULT — Returns response with a sample size that balances speed and accuracy.  
 •FASTER — Returns a fast response with a smaller sample size. 
 •HIGHER_PRECISION — Returns a more accurate response using a large sample size, but this may result in the response being slower.

Note: If I remember right the API should return some variable with your data. It tells you that the data was sampled: try looking for something like containsSampledData, sampleSize, or sampleSpace. I cant remember which one it is right this minute.

这篇关于小时尺寸的GA总体结果明显少于日期尺寸的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆