Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from
Mar 10, 2016

Conversation

jerrybendy
Copy link
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
Owner

Choose a reason for hiding this comment

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

前面的 id 没有影响是吗?

Copy link
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
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
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
habren pushed a commit to habren/hexo-theme-next that referenced this pull request Apr 8, 2017
添加CNZZ数据统计功能的支持(隐藏“站长统计”文字)
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