一个简单的应用程序,用于将 Matomo JS 跟踪代码添加到您的模板中。从`django-piwik`分叉。
项目描述
一个简单的应用程序,用于将 Matomo JS 跟踪代码添加到您的模板中。
django-matomo被列为官方 Django 集成包,位于: https ://matomo.org/integrate/ (自 2022 年 4 月起)。
当前的存储库是由 Raphael “ jasjukaitis ” Jasjukaitis 从django-piwik(旧版)分叉出来的。从 2013 年到 2022 年 3 月, django-piwik被列为 Matomo 的官方 Django 插件。
要求
姜戈
安装
使用 PyPI,您可以简单地在终端中输入:
点安装django-matomo
或者
easy_install django-matomo
配置
将matomo添加到settings.py文件中的INSTALLED_APPS列表中。
还需要 MATOMO_SITE_ID(例如51)和MATOMO_URL(例如'http://matomo.example.com/',请不要忘记结尾的斜杠!)。
在模板中,将{% load matomo_tags %}放在顶部,并在</body>标记之前添加{% tracking_code %} 。
而已。快乐追踪!
上传到 PyPi
关于如何将包上传到 PyPi的 Medium(Towards Data Science)文章。
简而言之:
python setup.py sdist
twine 上传 dist/*
版本历史
在接受django-matomo作为官方 Matomo 插件后,版本0.1.6 README 发生了变化。
0.1.5版有关上传到 PyPi 的信息已添加到自述文件中。较小的格式更改。
最高0.1.4的版本主要是对 RST README 格式的格式更改。
在0.1版本的软件包中引入了主要更改。