Created
March 23, 2015 13:31
-
-
Save cdalsass/906f000969a519383b0b to your computer and use it in GitHub Desktop.
Statcounter Ajax Script
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
var sc_project= "XXXXXX"; | |
var sc_invisible = 1; | |
var sc_security= "XXXXXX"; | |
// got this from here http://forum.statcounter.com/vb/archive/index.php/t-25668.html | |
var sc_partition = 0; | |
var scrWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth; | |
var h = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight; | |
var sc_server = sc_partition + 1; | |
var currentURL = encodeURIComponent(window.location.href); | |
var referrer = encodeURIComponent(document.referrer); | |
var java = "1"; | |
var title = encodeURIComponent(document.title); | |
var thisToken = Math.random(); | |
// not sure what these are | |
var sc_snum=1; | |
var p=0; | |
var u1 = "na"; | |
url = "http://c" + sc_server + ".statcounter.com/t.php?sc_project=" + sc_project + "&resolution=" + scrWidth + "&camefrom=" + referrer + "&u=" + currentURL + "&t=" + title + "&java=" + java + "&security=" + sc_security + "&invisible=" + sc_invisible + "&sc_random=" + thisToken + "&sc_snum=" + sc_snum + '&p=' + p + "&h=" + h + "&u1=" + u1; | |
//console.log(url); | |
img = new Image(0,0); | |
img.src = url; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment