Popylar: Tracking software use with Google Analytics

Popylar is a small Python package that allows tracking execution of Python code (such as imports) via the Google Analytics API. For example, once you have set up a google analytics account, you could track the import of your package by adding this to the package __init__.py file:

import popylar
popylar.track_event(google_analytics_id, 'import', 'import_mypackage')

With this setup, every time the package is imported it will be tracked on Google analytics.

Indices and tables