Skip to content

添加CNZZ数据统计功能的支持(隐藏“站长统计”文字)#712

Merged
iissnan merged 2 commits intoiissnan:masterfrom
jerrybendy:master
Mar 10, 2016
Merged

添加CNZZ数据统计功能的支持(隐藏“站长统计”文字)#712
iissnan merged 2 commits intoiissnan:masterfrom
jerrybendy:master

Conversation

@jerrybendy
Copy link
Copy Markdown
Contributor

目前国内使用CNZZ统计的还是比较多的,感觉还是有需要添加CNZZ的统计功能(百度统计暂时没有添加)。

在主题的配置文件中增加了一项cnzz_siteid的配置项,值为CNZZ里面添加统计的站点ID,这个ID可以在地址栏里,或者自动生成的脚本里面找到。

默认脚本生成的内容会产生“站长统计”几个字,感觉很丑而且和主题不太搭,我用了一个 display: none;把这几个字给隐藏了。

{% if theme.cnzz_siteid %}

<div style="display: none;">
<script src="http://s6.cnzz.com/stat.php?id=5160758&web_id={{ theme.cnzz_siteid }}" type="text/javascript"></script>
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

前面的 id 没有影响是吗?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

啊。。。报歉,我太马虎了。。。前面的id参数不影响统计,但最好还是改一下。。。

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

没事,我只是不确定这个 id 参数的意义

@jerrybendy
Copy link
Copy Markdown
Contributor Author

@iissnan 已经修改了,并把CNZZ的代码也放到了 analitics 目录下面

commit

iissnan added a commit that referenced this pull request Mar 10, 2016
添加CNZZ数据统计功能的支持(隐藏“站长统计”文字)
@iissnan iissnan merged commit 4215c63 into iissnan:master Mar 10, 2016
@iissnan iissnan mentioned this pull request Mar 22, 2016
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants