🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pyga-fc

Server side implemenation of Google Analytics in Python.

2.4.2
Maintainers
2

=================================================== PYGA: Python Google Analytics - Data Collection API

.. image:: https://secure.travis-ci.org/kra3/py-ga-mob.png?branch=master :alt: Build Status :target: http://travis-ci.org/kra3/py-ga-mob

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

  • You want to track data from server side
  • 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:

  • Expicient Inc <http://www.expicient.com>_
  • php-ga <http://code.google.com/p/php-ga>_

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts