I have a web domain on which I use Google Analytics to track users. I want to be able to download a report for my domain automatically (by a server running a scheduled job) via a web API every day.
I have looked at the Google Developers documentation to try to find out how to do this, but I couldn't find a simple step-by-step guide for this particular use case.
Is anyone able to either a) outline the steps required to achieve this, or b) point me to an existing step-by-step guide?
What I have done already:
- Create a Google Developers service account.
- Added the email address of the service account to the list of users who can access the analytics data for my domain.
as described here. However, that page then goes on to use tokens and embed graphs. I just want a simple script to download data via a single http request (if possible).
The query explorer is also useful.