Skip to content
Sébastien Barbieri's Blog
Sébastien Barbieri's Blog

Partage d'expérience de développements de sites et d'applications, d'ux, d'apprentissage machine, de coaching…

Sébastien Barbieri's Blog

Partage d'expérience de développements de sites et d'applications, d'ux, d'apprentissage machine, de coaching…

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

Posted on 2024-05-302024-05-30 By scips

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.

Datascience Open Source Serveur Software development analyticsgoogle

Post navigation

Previous post
Next post

Leave a Reply Cancel reply

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

  • Follow me on Mastodon
©2026 Sébastien Barbieri's Blog | WordPress Theme by SuperbThemes