Alex Rivera | Logout

How to trigger Google Analytics events from Python?

Asked 2010-01-11T02:18:17.467
25

I'm developing a site that has a REST API and I'd like to track the API usage using Google Analytics events. Is there a straightforward way to trigger GA events from Python that doesn't involve loading up an entire webbrowser component just to send a javascript request?

Edit
Report

2 Answers

13

This project called PyGA is much better. Unlike "Google-Analytics for Mobile" project on github it is well documentated and has rich API.

answered 2012-10-19T11:47:01.157
0

Basically it boils down to: https://gist.github.com/canburak/1593381

For more information about the parameters etc: https://medium.com/python-programming-language/80eb9691d61f

answered 2013-06-25T03:57:44.517

Your Answer