我从 Google Analytics API 收集的数据与用户界面中的自定义报告之间的收入指标存在差异。
每个值的差异保持相同的比率,其中通过 API 收集的数据大于自定义报告中的数据。
这是我正在使用的请求的正文:
{
"reportRequests":[
{
"viewId":"xxxxxxxxxx",
"dateRanges": [{"startDate":"2017-07-01","endDate":"2018-12-31"}],
"metrics": [
{"expression": "ga:transactionRevenue","alias": "transactionRevenue","formattingType": "CURRENCY"},
{"expression": "ga:itemRevenue","alias": "itemRevenue","formattingType": "CURRENCY"},
{"expression": "ga:productRevenuePerPurchase","alias": "productRevenuePerPurchase","formattingType": "CURRENCY"}
],
"dimensions": [
{"name": "ga:channelGrouping"},
{"name": "ga:sourceMedium"},
{"name": "ga:dateHour"},
{"name": "ga:transactionId"},
{"name": "ga:keyWord"}
],
"pageSize": "10000"
}]}
这是响应的摘录:
{{
"reports": [
{
"columnHeader": {
"dimensions": [
"ga:channelGrouping",
"ga:sourceMedium",
"ga:dateHour",
"ga:transactionId",
"ga:keyWord"
],
"metricHeader": {
"metricHeaderEntries": [
{
"name": "transactionRevenue",
"type": "CURRENCY"
},
{
"name": "itemRevenue",
"type": "CURRENCY"
},
{
"name": "productRevenuePerPurchase",
"type": "CURRENCY"
}
]
}
},
"data": {
"rows": [
{
"dimensions": [
"(Other)",
"bing / (not set)",
"2018052216",
"834042319461-01",
"(not set)"
],
"metrics": [
{
"values": [
"367.675436",
"316.55053699999996",
"316.55053699999996"
]
}
]
},
...
因此,如果我在 Google Analytics(分析)用户界面中创建自定义报告并查找事务 ID 834042319461-01,我会得到以下结果:
按交易 ID 834042319461-01 过滤的谷歌分析自定义报告
最后,API 响应中的收入值为 367.675436,但自定义报告中的值为 333.12,API 的值增加了 10.37%。我得到了所有值的 10.37% 的增长。
¿ 为什么我有这些差异?
¿ 为了解决这些问题,您建议做什么?
谢谢。