我创建了以下查询以从GA获取事件数据:
request_body = {
'reportRequests': [
{
'viewId': 'xxxxx',
'dateRanges': [{'startDate': '2020-01-01', 'endDate': '2020-03-31'}],
'metrics': [
{'expression': 'ga:itemRevenue'},
{'expression': 'ga:sessionDuration'},
],
# Get Pages
'dimensions': [
{"name": "ga:clientId"},
{"name": "ga:pagePath"},
{"name": "ga:dateHourMinute"},
{"name": "ga:shoppingStage"},
{"name": "ga:eventAction"},
{"name": "ga:source"},
],
# Filter by condition "containing products"
'orderBys': [{"fieldName": "ga:dateHourMinute", "sortOrder": "ASCENDING"}],
'pageSize': 1000,
}]
}
我总共收集了13.683行:
<class 'pandas.core.frame.DataFrame'>
RangeIndex: 13683 entries, 0 to 13682
Data columns (total 8 columns):
# Column Non-Null Count Dtype
--- ------ -------------- -----
0 clientId 13683 non-null object
1 pagePath 13683 non-null object
2 dateHourMinute 13683 non-null object
3 shoppingStage 13683 non-null object
4 eventAction 13683 non-null object
5 source 13683 non-null object
6 itemRevenue 13683 non-null object
7 sessionDuration 13683 non-null object
dtypes: object(8)
memory usage: 855.3+ KB
我在Google Analytics(分析ga:shoppingStage
)的Web界面中浏览了同一时间段(第1季度/ CY2020年)的购物行为分析(因为我查询了)
我希望在活动中看到相似的数字,但看不到任何匹配。我究竟做错了什么?
购物行为分析显示会话,而事件是单个交互。在单个会话中,用户可以具有多个交互(多个事件)。
无论如何,您都在比较具有混合范围(用户,会话,匹配)的不可比报告。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句