I am trying to download data from Universal Analytics (GA3) with the API.
I have downloaded different datasets, with different combinations of dimensions and metrics, in order to have a backup now that GA3 will be deleted for ever.
For certain tables, the API returns data from my desired starting date (which is 2021-09-25) but for other combinations, the data starts at another, later, date (2022-04-27).
For instance, for the combination of dimensions and metrics like
- dimensions:
“ga:date”, “ga:sourcemedium” - metrics:
‘ga:users’,
‘ga:newusers’,
“ga:sessions”,
‘ga:bounces’,
‘ga:pageviews’,
‘ga:avgsessionduration’,
‘ga:transactions’,
‘ga:goalcompletionsall’,
‘ga:avgtimeonpage’,
‘ga:transactionrevenue’
I get the complete data set, but when I try to add a new dimension like “ga:campaign”, the dataset is truncated and it starts on 2022-04-27. It always starts on that date. In the Google Analytics platform there is data from september 2021.
It happens with any dataset that I try to download that contains more than 2 dimensions.
Note: I always need the ga:date dimension as part of my dataset.
The way I access the data is I make an API call for each day and try to get the data for that day and save it as a pandas dataframe. Then I concatenate all dataframes.
Anyone has some idea of what is happening?
I have administrator access to the GA3 property and view.
Thanks!
Pere Munar is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.