-
Discrepancy between Google Analytics API and web UI data count
Hey, I’m wrestling with a bit of a numbers quandary here. So, there’s roughly 35k entries on the web UI that I download as a CSV file, right? But when I check the count, it’s showing me only 600 or so. Something’s off.
Anyway, here’s the code I’ve been using.
dimensions = ["sessionSource","customEvent:order_id","date","platform"] metrics = ['sessions'] request = { "requests": [ { "dateRanges": [ { "startDate": "2022-10-15", "endDate": "2022-10-17" } ], "dimensions": [{'name': name} for name in dimensions], "metrics": [{'name': name} for name in metrics], "limit": 10, "return_property_quota": True, "keep_empty_rows": True, "data_loss_from_other_row": False } ] } analytics = build('analyticsdata', 'v1beta', credentials=credentials) response = analytics.properties().batchRunReports(property=property_id, body=request).execute() report_data = defaultdict(list)
Log in to reply.