How to retrieve Google analytics 3 – Universal analytics data before shutdown

If you need to retrieve all your data before the 1st July shutdown.

I setup a small bunch of notebook and service in python that does tat using the Google analytics 3 API.

Here is the link to the repository https://gitlab.com/opendojo/ga3-retriever

Fork it, create or reuse a service account that has access to the property.

To grant access to a service account simply add the service account email in the list of viewer of the Google analytics main property.

In the Repository you will have a bunch of utilities to navigate the Google analytics API.

I create a service that runs since few days now, and I’m retrieving about 2 years of google analytics data per day.

I hope you enjoy, I could sleep before finding a soltion to fetch everything in a quite resiliant wait.

The service itself can run without the notebook, the notebook will simply help setup the work list.

I used a SQLite database as a keeper of the to do list / work item to process.

This ensure a fail safe, and an easy restart when problems occurs.

So far I’m about half of the work.

Oh and yes it’s connected to slack so you get update or information when it’s stuck somehow.

chevron_left

Leave a comment

Your email address will not be published. Required fields are marked *

Comment
Name
Email
Website