作为个人开发者手下有一些站点
需要统计下用户访问情况
博客: https://xjq.icu
在线编辑器: https://r.xjq.icu
Awesome Study: https://tool.xjq.icu
在线编辑器有一定的用户访问,所以写了个访问情况的工具
- 统计 PV 、UV
- 统计访问用户区域信息
- 统计访问用户设备信息
- 统计渠道来源,例如从 Google 、百度 搜索跳转
线上 Demo
Github 地址
https://github.com/xjq7/statistic
要接入使用的话可以插入下面代码到 html body 标签底部
<script src="https://image.xjq.icu/statistic/statistic.js"></script>
然后看看效果
我的站点 是 https://r.xjq.icu
访问统计站点是 https://s.xjq.icu 接 hash 值为站点域名