Skip to main content

Jmbo analytics app.

Project description

Jmbo Analytics

Jmbo analytics brings the power of Google Analytics to your Django projects

Travis

Required

  • You have to add jmbo_analytics to you INSTALLED_APPS

  • You have to specify a Google Analytics tracking code.

where xxx is your tracking code:

JMBO_ANALYTICS = {
   'google_analytics_id': 'xxx',
}

Usage

jmbo-analytics offers you two ways to add tracking to your pages.

1. HTML tag

Using <img /> and putting it in your base.html:

{% load jmbo_analytics_tags %}
<div style="display: none;">
   <img src="{% google_analytics %}" width="0" height="0" />
</div>

2. Middleware and Celery

Using Django’s middleware you can process every request and use Celery to make the request to Google Analytics. Note that this does not work behind a reverse caching proxy:

MIDDLEWARE_CLASSES = (
   'jmbo_analytics.middleware.GoogleAnalyticsMiddleware',
)

You may have to add jmbo_analytics to your CELERY_IMPORTS:

CELERY_IMPORTS = ('jmbo_analytics.tasks')

You may also specify paths that will be excluded when tracking:

GOOGLE_ANALYTICS_IGNORE_PATH = ['/health/', ]

Authors

Praekelt Consulting

  • Hedley Roos

Unomena

  • Euan Jonker

Changelog

0.2.2

  1. Fixed incorrect header key.

0.2.1

  1. Send correctly named header.

0.2

  1. Use requests library because it can drill through HTTP proxies.

0.1

  1. Simplify dependencies.

  2. Make transparent GIF method asynchronous.

0.0.4

  1. Better packaging.

0.0.3

  1. Fork, rename, re-license from panomena-analytics.

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

jmbo-analytics-0.2.2.tar.gz (11.0 kB view details)

Uploaded Source

Built Distribution

jmbo_analytics-0.2.2-py2.7.egg (17.5 kB view details)

Uploaded Source

File details

Details for the file jmbo-analytics-0.2.2.tar.gz.

File metadata

File hashes

Hashes for jmbo-analytics-0.2.2.tar.gz
Algorithm Hash digest
SHA256 9ac04e4032bac27b622eb7ed941b4bf2a7c695bfae61830f8ef40a9be7b1176d
MD5 60c256b5ca49b2179ef13ccee909eea0
BLAKE2b-256 3f023ed82c068b9ff75ab03419389ebc8cd91e0cf4699b7f2e0738dcf6b64e0c

See more details on using hashes here.

File details

Details for the file jmbo_analytics-0.2.2-py2.7.egg.

File metadata

File hashes

Hashes for jmbo_analytics-0.2.2-py2.7.egg
Algorithm Hash digest
SHA256 bc00a5de6085f506e662d83275f62d833f09622b8052435c69716a0a19e7d344
MD5 c95b8159a768457e7fc0335637fdbd0a
BLAKE2b-256 bc1bdeab44887492e17bc7f4e0a913694fe67495e1b4b6056239208b482e1cc9

See more details on using hashes here.

Supported by

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