Skip to main content

Server side implemenation of Google Analytics in Python.

Project description

Build Status https://pypip.in/v/pyga/badge.png https://pypip.in/d/pyga/badge.png

pyga is an iplementation of Google Analytics (ga.js) 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).

PS: google moved away from ga.js to analytics.js; a new operating standard for Google Analytics named “universal analytics”. Soon ga.js will be deprectaed. I’m planning to have a pyga equivalent to the new standard. Read more here at https://developers.google.com/analytics/devguides/collection/upgrade/#upgrade-guides https://developers.google.com/analytics/devguides/collection/protocol/v1/#getting-started

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)

PHP version

Thanks to: Expicient Inc

And for you fans outthere, we even have mountain bikes named pyga ;)

Project details


Download files

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

Source Distribution

pyga-2.5.1.tar.gz (21.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyga-2.5.1-py2-none-any.whl (24.2 kB view details)

Uploaded Python 2

File details

Details for the file pyga-2.5.1.tar.gz.

File metadata

  • Download URL: pyga-2.5.1.tar.gz
  • Upload date:
  • Size: 21.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pyga-2.5.1.tar.gz
Algorithm Hash digest
SHA256 d074a9eb73c23b252c5c2ac9a25439022938b8c011db93953696ad2cbff3fa58
MD5 e1eaf5e30652c5f88e2dfbc2c376c7a5
BLAKE2b-256 1fa261cb5d38b17eec61868414337e8b0a71ac1b79901ac12a337e84db59177e

See more details on using hashes here.

File details

Details for the file pyga-2.5.1-py2-none-any.whl.

File metadata

  • Download URL: pyga-2.5.1-py2-none-any.whl
  • Upload date:
  • Size: 24.2 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pyga-2.5.1-py2-none-any.whl
Algorithm Hash digest
SHA256 18b1165d80e5b2d8f652425febae4283a4f1a5768c30fda652609dfd6dc5db72
MD5 eedc1386bf1dfd322849214a457dacc4
BLAKE2b-256 d5369e97ef2803eed8ba4ef021b352f65a76c3f7e2455a762bfb517c669c9bf5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page