Skip to main content

Server side implemenation of Google Analytics in Python.

Project description

Build Status

pyga is an iplementation of Google Analytics in Python;so that it can be used at server side. This project only helps you with Data Collection part of Google Analytics. ie., You can consider this as a replacement for ga.js at client side.

Google Provides Android SDK,iOS SDK + Flash SDK. And left everybody else with a single page documentation about GIF request parameters. Also with a basic sample of server side implementation in quite a few languages (perl, php, jsp).

Use Cases

  1. You want to track data from server side
  2. You’re developing a mobile site and have to support devices w/o JS support

Supported Features

  • Page View

  • E-Commerce

  • Social Interaction

  • Custom Variables

  • Events

  • Campaigns

    not yet

  • Ad-Words

  • Search Engine

To know more about mobiletracking see: https://developers.google.com/analytics/devguides/collection/other/mobileWebsites

Example

from pyga.requests import Tracker, Page, Session, Visitor

tracker = Tracker('MO-XXXXX-X', 'yourdomain.com')
visitor = Visitor()
visitor.ip_address = '194.54.176.12'
session = Session()
page = Page('/path')
tracker.track_pageview(page, session, visitor)

Thanks to:

Project details


Release history Release notifications

History Node

2.5.1

History Node

2.5.0

History Node

2.4.2

This version
History Node

2.4.1

History Node

2.4

History Node

2.3

History Node

2.2

History Node

2.1

History Node

2.0

History Node

1.4

History Node

1.3

History Node

1.2

History Node

1.1

History Node

0.1.1

History Node

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
pyga-2.4.1-py2.7.egg (45.2 kB) Copy SHA256 hash SHA256 Egg 2.7 Sep 2, 2012
pyga-2.4.1.tar.gz (21.2 kB) Copy SHA256 hash SHA256 Source None Sep 2, 2012

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page