Jmbo analytics app.
Project description
Jmbo Analytics
Jmbo analytics brings the power of Google Analytics to your Django projects
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/', ]
Changelog
0.2.2
Fixed incorrect header key.
0.2.1
Send correctly named header.
0.2
Use requests library because it can drill through HTTP proxies.
0.1
Simplify dependencies.
Make transparent GIF method asynchronous.
0.0.4
Better packaging.
0.0.3
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
Built Distribution
File details
Details for the file jmbo-analytics-0.2.2.tar.gz
.
File metadata
- Download URL: jmbo-analytics-0.2.2.tar.gz
- Upload date:
- Size: 11.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ac04e4032bac27b622eb7ed941b4bf2a7c695bfae61830f8ef40a9be7b1176d |
|
MD5 | 60c256b5ca49b2179ef13ccee909eea0 |
|
BLAKE2b-256 | 3f023ed82c068b9ff75ab03419389ebc8cd91e0cf4699b7f2e0738dcf6b64e0c |
File details
Details for the file jmbo_analytics-0.2.2-py2.7.egg
.
File metadata
- Download URL: jmbo_analytics-0.2.2-py2.7.egg
- Upload date:
- Size: 17.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bc00a5de6085f506e662d83275f62d833f09622b8052435c69716a0a19e7d344 |
|
MD5 | c95b8159a768457e7fc0335637fdbd0a |
|
BLAKE2b-256 | bc1bdeab44887492e17bc7f4e0a913694fe67495e1b4b6056239208b482e1cc9 |