How to carry on the traffic statistics on the website, can find the third party service website to register, but also can add the code directly on the website, just the following code copy to your webpage, copy to </body> before can. is not very simple AH.
<script language=javascript>
<!--
var caution = False
function Setcookie (name, value, expires, path, domain, secure) {
var Curcookie = name + "=" + Escape (value) +
((expires)? "; Expires= "+ expires.togmtstring ():" ") +
((path)? "; Path= "+ Path:" "") +
(domain)? "; domain= "+ Domain:" "") +
(secure)? "; Secure ":" ")
if (!caution | | (name + "=" + Escape (value)). length<= 4000)
Document.cookie = Curcookie
Else
if (Confirm ("Cookie exceeds 4KB and would be cut!"))
Document.cookie = Curcookie
}
function GetCookie (name) {
var prefix = name + "="
var cookiestartindex = document.cookie.indexOf (prefix)
if (Cookiestartindex = = 1)
return null
var cookieendindex = document.cookie.indexOf (";", cookiestartindex+ Prefix.length)
if (Cookieendindex = = 1)
Cookieendindex = Document.cookie.length
Return unescape (document.cookie.substring (Cookiestartindex +prefix.length, Cookieendindex))
}
function Deletecookie (name, path, domain) {
if (GetCookie (name)) {
Document.cookie = name + "=" +
((path)? "; Path= "+ Path:" "") +
(domain)? "; domain= "+ Domain:" "") +
"; Expires=thu, 01-jan-70 00:00:01 GMT "
}
}
function Fixdate (date) {
var base = new Date (0)
var skew = Base.gettime ()
if (Skew > 0)
Date.settime (Date.gettime ()-skew)
}
var now = new Date ()
Fixdate (now)
Now.settime (Now.gettime () + 365 * 24 * 60 * 60 * 1000)
var visits = GetCookie ("Counter")
if (!visits)
Visits = 1
Else
visits = parseint (visits) + 1
Setcookie ("Counter", visits, now)
document.write ("You are the first" + Visits + "bit to visit this topic. ")
-->
</script>