Skip to content
Script that connects to Google Analytics and retrieves data to a PDF
Python HTML
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
templates
.gitignore
README.md
analytics_service_object.py
convert_pdf.py
get_mail.py
get_social.py
main.py

README.md

Google Analytics Auto-script

This script checks the Google Analytics account and returns a printable PDF with the relevant data. For now, it works with Social and E-mail Campaigns reports.

To run:

You need to get your 'client_secrets.json' first! here is a very good tutorial of how to get it.

Fist, you need to install the following packages:

$ sudo apt-get install python-dev libjpeg-dev zlib1g-dev virtualenv

Create a new virtual environment and install the dependencies

$ virtualenv env
$ source env/bin/activate
(env) $ pip install -r requirements.txt
(Installing)

To run all the scripts:

(env) $ python main.py

To run only one script:

(env) $ python get_mail.py

And that's it.

Note:

Ignore the "from private_data import profile_id" parts, that's the file where I get my profile's id. You should replace that with your own profile id.

You can’t perform that action at this time.