一个可重用的django应用程序,通过电子邮件发送谷歌分析报告。
django-ga-mail的Python项目详细描述
一个可重用的django应用程序,通过电子邮件发送谷歌分析报告。
安装
从pypi获得最新的稳定版本
$ pip install django-ga-mail
从github获取最新提交
$ pip install -e git+git://github.com/nanvel/django-ga-mail.git#egg=ga_mail
将ga_mail添加到INSTALLED_APPS
INSTALLED_APPS=(...,'ga_mail',)
在“设置”中指定下一个变量:
GA_PROFILE_ID=12345678GA_USERNAME='some.user@gmail.com'# don't use your working account here,# create another one for analytics and give it access to ga profileGA_PASSWORD='somepass'GA_SOURCE_APP_NAME='some.site',ANALYTICS_BLOCKS=('new_visitors_30days_today','new_visitors_7days_today_vs_14days_7days','pageviews_7days_today')
检查managers变量是否包含必要的电子邮件。
可用块:
- returning_visitors_7days_today
- new_visitors_7days_today
- new_visitors_30days_today
- new_visitors_7days_today_vs_14days_7days
- new_visitors_7days_today_vs_returning_visitors_7days_today
- pageviews_7days_today
- countries_30days_today
调用python manage.py ga_mail发送分析报告。
贡献
如果您想参与此项目,请执行以下步骤
# Fork this repository # Clone your fork $ virtualenv .env --no-site-packages $ source .env/bin/activate $ python setup.py install $ pip install -r test_requirements.txt $ git co -b feature_branch master # Implement your feature and tests $ git add . && git commit $ git push -u origin feature_branch # Send us a pull request for your feature branch