Skip to content
Proyek

idlesign/django-sitemetrics

Lihat di GitHub

Tentang

Reusable application for Django that offers easy integration with different site metrics service providers.

Pengembangan web dan aplikasi

Cara angka ini diukur

Pertumbuhan bintang terukur

dalam 24 jam
0
dalam 7 hari
0
dalam 15 hari
Mengumpulkan riwayat
dalam 1 bulan
Mengumpulkan riwayat

Perubahan bersih pada periode yang tumpang tindih, bukan total harian. Pengukuran yang belum tersedia dibiarkan kosong. Bintang menunjukkan perhatian, bukan kualitas.

README.md

Asli

django-sitemetrics

https://github.com/idlesign/django-sitemetrics

release lic coverage

What's that

Reusable application for Django providing easy means to integrate site metrics counters into your sites.

Built-in site metrics providers

  1. Yandex Metrika — https://metrika.yandex.ru/

    Provider alias: yandex

  2. Google Analytics — https://www.google.com/analytics/

    Provider alias: google

  3. Openstat — https://www.openstat.com/

    Provider alias: openstat

How to use

  1. Add the sitemetrics application to INSTALLED_APPS in your settings file (usually settings.py)
  2. 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

https://django-sitemetrics.readthedocs.io/

Jelajahi proyek terkait

Memuat…