This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Python implementation of the Piwik HTTP API.

Note: This project is called python-piwik on PyPI since pypiwik is already taken by an abandoned project.

# Usage

Basic usage:

from pypiwik.tracker import PiwikTracker tracker = PiwikTracker(‘http://example.com’, 1)

now you can call

tracker.track_page_view()

to make a server-to-server tracking request, or call

tracker.tracking_code()

to generate the correct Javascript snippet.

## Tracking variables

Tracking variables are set as class attributes on the tracker object. Have a look at the pypiwik.tracker.PARAMETERS dictionary to see which attribute maps to which tracking parameter, e.g.:

tracker = PiwikTracker(‘http://example.com’, 1) tracker.action_name = ‘Help / Support’ tracker.track_page_view()

You can also pass the tracking variables to the track_page_view or tracking_code call as kwargs. The code above is equivalent to the following:

tracker = PiwikTracker(‘http://example.com’, 1) tracker.track_page_view(action_name=’Help / Support’)

## Custom variables

Custom variables can be set in the page_custom_vars and visit_custom_vars dictionary to track custom variables in the page and visit scope:

_Note:_ Piwik allows at most 5 custom variables per scope. When making server-to-server requests, the code does not check for the numbers of variables in the dictionary.

## Server API

When making server-to-server calls, pypiwik will use HTTP headers for the following variables to reduce the request size:

  • user_agent
  • referer
  • lang

If you want to pass the values as regular variables, set spoof_request to False on the tracker instance.

## Cloning another request

If you want to make server-to-server requests based on a HTTP request of an actual user, pass the request object to __init__:

tracker = PiwikTracker(‘http://example.com’, 1, request)

_Note:_ atm, only Django-like request objects supported (an object which has a META dictionary).

# TODO

Release History

Release History

0.2

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.5.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.5

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.4

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.3

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
python-piwik-0.2.tar.gz (23.5 kB) Copy SHA256 Checksum SHA256 Source Nov 6, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting