1, Foreword
When using the website statistics service of "Youmeng +", a problem is that when adding statistics code, a text link of "webmaster statistics" will always be displayed at the place where the statistics code is added. On the page of "Youmeng +" obtaining statistical codes, only four forms of statistical codes are provided. These four forms will be displayed, either text links or picture links. There is no way to hide them.
I don't think it's good. The user needs are changeable, and the page display is diverse. Do you have to display a text link of "webmaster statistics"? Obviously, "Youmeng +" does not take into account the feelings of the webmaster in this regard. Of course, we can't ignore the contribution of "Youmeng +" to the webmaster because it's not good. In this article, I added a link to "Youmeng +". At present, we can only hide text links through some technical means.
Some people may be unfamiliar with "Youmeng +", but if you mention the "CNZZ" Chinese website statistical analysis platform, the webmaster may be familiar with the information obtained by online search.
On January 26, 2016, the mobile big data service platform Youmeng, the Chinese website statistical analysis platform cnzz and the Internet data service platform diyuanxin announced the merger in Beijing to establish a new company "Youmeng +". It is worth noting that Alibaba is a joint investor of the above three companies.
2, Hide "webmaster statistics" text link
On the page of obtaining statistics code, use "text form" Statistics code. There are 2 Statistical codes available in this form. See the figure below.
Use "text form" statistical code
1. The first hiding method
The first code that uses the "text form" statistical code is placed in the hidden
Original statistical code:
<script type="text/javascript" src="https://s96.cnzz.com/z_stat.php?id=1276450713&web_id=1276450713"></script>
The code 1276450713 is the ID of your current statistical website. Change the code to:
<div style="display:none"> <script type="text/javascript" src="https://s96.cnzz.com/z_stat.php?id=1276450713&web_id=1276450713"></script> </div>
2. The second hiding method
Use the second code of "text form" statistical code to modify the statistical code to achieve the purpose of hiding.
Original statistical code:
<script type="text/javascript"> var cnzz_protocol = (("https:" == document.location.protocol) ? "https://" : "http://"); document.write( unescape("%3Cspan id='cnzz_stat_icon_1276450713'%3E%3C/span%3E%3Cscript src='" + cnzz_protocol + "s96.cnzz.com/z_stat.php%3Fid%3D1276450713' type='text/javascript'%3E%3C/script%3E") ); </script>
Note that the statistical code is formatted.
Modify the value in the unescape() function and add style='display:none 'after the string% 3Cspan. Note that there should be spaces before and after it. Revised as follows:
<script type="text/javascript"> var cnzz_protocol = (("https:" == document.location.protocol) ? "https://" : "http://"); document.write( unescape("%3Cspan style='display:none' id='cnzz_stat_icon_1276450713'%3E%3C/span%3E%3Cscript src='" + cnzz_protocol + "s96.cnzz.com/z_stat.php%3Fid%3D1276450713' type='text/javascript'%3E%3C/script%3E") ); </script>
Modified here, you can hide text links without affecting the statistical use of the website. However, the code can be further streamlined and the execution efficiency is higher.
View cnzz in code_ The protocol variable is used to obtain which protocol (http or https) the current website uses. If you can determine which protocol your website uses, such as https, you can remove cnzz_ The protocol variable, and at the reference variable, is directly modified to https: / /, as follows:
<script type="text/javascript"> document.write( unescape("%3Cspan style='display:none' id='cnzz_stat_icon_1276450713'%3E%3C/span%3E%3Cscript src='https://s96.cnzz.com/z_stat.php%3Fid%3D1276450713' type='text/javascript'%3E%3C/script%3E") ); </script>
Continue to modify the code, check the string in the unescape() function, and find that it actually outputs the encoded and