-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
--- | ||
title: 新版本不蒜子统计平台使用说明 | ||
tags: | ||
- 统计 | ||
categories: | ||
- 资源分享 | ||
date: 2024-12-26 00:00:00 | ||
--- | ||
|
||
> 想给静态博客加一个访问统计工具吗?LeanCloud 有并发数的限制,且国内节点需域名备案才能使用。各大国内统计平台也陆续开始收费了。不蒜子的节点位于美国访问太慢,咋办?快看这里,杜老师又出公益服务了! | ||
<!-- more --> | ||
|
||
## 特别感谢 | ||
|
||
首先特别感谢星辰童鞋,杜老师自建的国内不蒜子统计平台使用的就是他的开源代码,并且在测试过程中,提供了大量的帮助。 | ||
|
||
通过 Golang+Redis 实现模仿不蒜子统计功能;UV 通过 IP+UA 统计,PV 通过 Referer 区分。 | ||
|
||
服务器的配置为 2H4G,下行带宽为 100M,上行为 5M。 | ||
|
||
主机位于北京,所有流量走境内 CDN。 | ||
|
||
## 食用方法 | ||
|
||
如果是 Volantis 主题: | ||
|
||
``` | ||
############################# Analytics ############################# > start | ||
analytics: | ||
busuanzi: https://npm.onmicrosoft.cn/[email protected]/bsz.js # 修改这里即可 | ||
############################# Analytics ############################# > end | ||
``` | ||
|
||
如果非 Volantis 主题: | ||
|
||
``` | ||
<script async src="https://npm.onmicrosoft.cn/[email protected]/bsz.js"></script> | ||
本文总阅读量 <span id="busuanzi_page_pv"></span> 次 | ||
本文总访客量 <span id="busuanzi_page_uv"></span> 人 | ||
本站总访问量 <span id="busuanzi_site_pv"></span> 次 | ||
本站总访客数 <span id="busuanzi_site_uv"></span> 人 | ||
``` | ||
|
||
如果是 Butterfly 主题: | ||
|
||
需修改文件 `layout/includes/additional-js.pug`,位于 72 行左右: | ||
|
||
`script(async data-pjax src='//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js')` | ||
|
||
改为 | ||
|
||
`script(async data-pjax src='//npm.onmicrosoft.cn/[email protected]/bsz.js')` |