Reusable application for Django providing easy means to integrate site metrics counters into your sites
Project description
http://github.com/idlesign/django-sitemetrics
What’s that
Reusable application for Django providing easy means to integrate site metrics counters into your sites
Built-in site metrics providers
Yandex Metrika - http://metrika.yandex.ru/
Provider alias: yandex
Google Analytics - http://www.google.com/analytics/
Provider alias: google
Openstat - https://www.openstat.com/
Provider alias: openstat
How to use
Add the sitemetrics application to INSTALLED_APPS in your settings file (usually settings.py)
Add {% load sitemetrics %} tag to the top of a template (usually base template, e.g. _base.html)
Then you have two options to add metrics counter code to your page:
Use four arguments sitemetrics tag notation:
{% sitemetrics by google for "UA-000000-0" %}
Here: google is a metrics provider alias; UA-000000-0 - metrics counter keycode.
That is how you put Google Analytics counter code (with UA-000000-0 keycode) into page.
Use no arguments sitemetrics tag notation:
{% sitemetrics %}
That is how you put all counter codes registered and active for the current site.
Client codes are registered with sites through Django Admin site interface.
Admin site and Sites from Django contribs are required for this approach to work.
Use ./manage.py migrate to install sitemetrics tables into your database.
Documentation
Project details
Release history Release notifications | RSS feed
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 django-sitemetrics-1.2.0.tar.gz
.
File metadata
- Download URL: django-sitemetrics-1.2.0.tar.gz
- Upload date:
- Size: 22.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: Python-urllib/2.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 15a34246958ea008f1397a824de3e99ab08f1021ce48aa9dbe5ee0a7a93eed65 |
|
MD5 | 50d1f042c6f8348b58339c443c988ff2 |
|
BLAKE2b-256 | f4301a2e2d0b2ee1db832908a0ede1a9f12794ab02bd7582b5b570d0e1d3d38a |
File details
Details for the file django_sitemetrics-1.2.0-py2.py3-none-any.whl
.
File metadata
- Download URL: django_sitemetrics-1.2.0-py2.py3-none-any.whl
- Upload date:
- Size: 25.6 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: Python-urllib/2.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c26e531420b7b5351cadd12ebdf939979376e7776f3c644220235c9c73d03780 |
|
MD5 | 6340de62dfa3fdd9d3f2c61cfac7ab86 |
|
BLAKE2b-256 | 651c8b315b6c42678800d212d4fb4a880561585d8e0450a926d0dd569859e75a |