Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

WSGI middleware for Google analytics

Project Description

repoze.urchin README

This package provides WSGI middleware for injecting the markup required to use Google Analytics into web pages.

Please see docs/index.rst for detailed documentation.

repoze.urchin Changelog

0.2 (2011-10-10)

  • Replaced urchin javascript with new async tracking code. See:

    Note that the script is now inserted at the end of the <head> tag.

  • Added bypass for HEAD requests. This is a workaround for an assertion in webob.Response that doesn’t let you set the body on a response if the request method is ‘HEAD’. This behavior on the part of webob is actually bogus, as outlined here:

    The key issue here is that as long as anything in the WSGI stack tries to special case ‘HEAD’ requests, we can end up with responses with headers which differ depending on whether the request method is ‘GET’ or ‘HEAD’. In this specific example, by bypassing the urchin processing in the event of a HEAD request, we wind up with a Content-Length header for HEAD that doesn’t include the extra bytes for the inserted urchin code that we would get with a GET request. This is, by definition of the standards, wrong, and yet unavoidable as long as webob is in our stack.

    For now, we can hold our noses and know that probably nothing’s going to really break because of this discrepency, but we can maybe try to convince the webob crowd to drop conditional processing for HEAD requests.

0.1 (2009-06-02)

  • Initial release.
Release History

Release History

This version
History Node


History Node


Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
repoze.urchin-0.2.tar.gz (17.2 kB) Copy SHA256 Checksum SHA256 Source Oct 11, 2011

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS 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