Google 分析报告 - 更广泛的数据范围过滤掉结果
Google Analytics reporting - wider data range filters out the result
我正在尝试使用其他自定义维度值过滤器获取存储在自定义维度中的 GA 客户 ID。
问题是我不知道为什么当我将 start-date=2019-01-01
更改为 start-date=2016-01-01
或 start-date=2006-01-01
时 start-date=2019-01-01
得到的结果消失了。为什么会这样?我想搜索所有用户。
有没有其他方法只是根据维度找到用户,我不需要任何指标。
https://ga-dev-tools.appspot.com/query-explorer/?start-date=2019-01-01&end-date=2019-01-28&metrics=ga%3Ausers&dimensions=ga%3Adimension16%2Cga%3Adimension65&filters=ga%3Adimension16%3D%3DUMM8SBTCS0U7HIZL&include-empty-rows=true
Java:
DateRange dateRange = new DateRange();
dateRange.setStartDate("2018-01-01");
dateRange.setEndDate("2019-01-28");
final Dimension euciDimension = new Dimension().setName("ga:dimension65");
final Dimension gaDimension = new Dimension().setName("ga:dimension16");
ReportRequest request = new ReportRequest()
.setViewId(VIEW_ID)
.setDimensions(Arrays.asList(euciDimension,gaDimension))
.setDateRanges(Arrays.asList(dateRange))
.setMetrics(Arrays.asList(sessionsMetrics)).setPageSize(1000).setIncludeEmptyRows(true)
.setSamplingLevel("LARGE")
.setFiltersExpression("ga:dimension16==XYZ");
ArrayList<ReportRequest> requests = new ArrayList<ReportRequest>();
requests.add(request);
// Create the GetReportsRequest object.
GetReportsRequest getReport = new GetReportsRequest()
.setReportRequests(requests);
// Call the batchGet method.
GetReportsResponse response = service.reports().batchGet(getReport).execute();
采样
In data analysis, sampling is the practice of analyzing a subset of all data in order to uncover the meaningful information in the larger data set. For example, if you wanted to estimate the number of trees in a 100-acre area where the distribution of trees was fairly uniform, you could count the number of trees in 1 acre and multiply by 100, or count the trees in a half acre and multiply by 200 to get an accurate representation of the entire 100 acres.
无法在 Google 分析 api 或网站中禁用数据采样。解决它的唯一方法是使用较小的日期范围。过去 12 年的抽样结果很可能总是抽样,除非您在不到一年前开始建站。
您可以检查响应以查看您的数据是否经过采样,然后只需减少数据的数量,直到它不再显示为采样。
注意大查询:如果您有权访问删除采样,则可以将数据导出到大查询帐户。
缺失数据
如果您昨天才开始发送自定义维度,那么上周的数据不包含此自定义维度的任何值,因此不会返回数据。无法对当时不存在的数据进行分析。
我正在尝试使用其他自定义维度值过滤器获取存储在自定义维度中的 GA 客户 ID。
问题是我不知道为什么当我将 start-date=2019-01-01
更改为 start-date=2016-01-01
或 start-date=2006-01-01
时 start-date=2019-01-01
得到的结果消失了。为什么会这样?我想搜索所有用户。
有没有其他方法只是根据维度找到用户,我不需要任何指标。
https://ga-dev-tools.appspot.com/query-explorer/?start-date=2019-01-01&end-date=2019-01-28&metrics=ga%3Ausers&dimensions=ga%3Adimension16%2Cga%3Adimension65&filters=ga%3Adimension16%3D%3DUMM8SBTCS0U7HIZL&include-empty-rows=true
Java:
DateRange dateRange = new DateRange();
dateRange.setStartDate("2018-01-01");
dateRange.setEndDate("2019-01-28");
final Dimension euciDimension = new Dimension().setName("ga:dimension65");
final Dimension gaDimension = new Dimension().setName("ga:dimension16");
ReportRequest request = new ReportRequest()
.setViewId(VIEW_ID)
.setDimensions(Arrays.asList(euciDimension,gaDimension))
.setDateRanges(Arrays.asList(dateRange))
.setMetrics(Arrays.asList(sessionsMetrics)).setPageSize(1000).setIncludeEmptyRows(true)
.setSamplingLevel("LARGE")
.setFiltersExpression("ga:dimension16==XYZ");
ArrayList<ReportRequest> requests = new ArrayList<ReportRequest>();
requests.add(request);
// Create the GetReportsRequest object.
GetReportsRequest getReport = new GetReportsRequest()
.setReportRequests(requests);
// Call the batchGet method.
GetReportsResponse response = service.reports().batchGet(getReport).execute();
采样
In data analysis, sampling is the practice of analyzing a subset of all data in order to uncover the meaningful information in the larger data set. For example, if you wanted to estimate the number of trees in a 100-acre area where the distribution of trees was fairly uniform, you could count the number of trees in 1 acre and multiply by 100, or count the trees in a half acre and multiply by 200 to get an accurate representation of the entire 100 acres.
无法在 Google 分析 api 或网站中禁用数据采样。解决它的唯一方法是使用较小的日期范围。过去 12 年的抽样结果很可能总是抽样,除非您在不到一年前开始建站。
您可以检查响应以查看您的数据是否经过采样,然后只需减少数据的数量,直到它不再显示为采样。
注意大查询:如果您有权访问删除采样,则可以将数据导出到大查询帐户。
缺失数据
如果您昨天才开始发送自定义维度,那么上周的数据不包含此自定义维度的任何值,因此不会返回数据。无法对当时不存在的数据进行分析。