Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

An implementation of the Google Analytics for Mobile in python. Includes a literal translation of ga.php and a FLUP server wrapper for the GIF image serving, as well as template tags for Django.

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 ga_app
Octocat-spinner-32 .gitignore
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README
Octocat-spinner-32 ga.py
Octocat-spinner-32 ga_mobile
Octocat-spinner-32 ga_mobile_server.py
Octocat-spinner-32 messaging.py
Octocat-spinner-32 setup.py
README
This project is licensed under the MIT open source license.  See the LICENSE file for more details.

This package includes:

1) A direct translation of the Google Analytics for Mobile PHP file ga.php to Python (ga.py).  You can probably integrate this into your own setup by importing 'track_page_view' and providing it with the appropriate WSGI request environment.  (From Django, you could probably pass in request.META directly, for example.)

2) A FLUP based FastCGI implementation in ga_mobile_server.py.  Set up nginx or Apache to call this.

3) A startup script for the FLUP server in ga_mobile.  

4) A django app with a template tag you can use on your django site.

The Django app uses 2 django settings:

    ``GA_MOBILE_PATH`` path (including leading /) to location of your tracking CGI.
    ``GA_MOBILE_ACCOUNT``: your GA mobile account number such as MO-XXXXXX-XX

To use the django app:
	add ga_app to your INSTALLED_SETTINGS
	add a url to ga_app.urls:
	(r'^ga/', include('ga_app.urls')),
Something went wrong with that request. Please try again.