I am creating my own library for linking to Google Analytics web analytics , Open web analytics .
In Google Analytics, the domain is hashed, and this hash is stored in a cookie .
I found a similar hashing technique in the hedgehog tracker:
function(d) { if (!d || d == "") return 1; var h = 0, g = 0; for (var i = d.length - 1; i >= 0; i--) { var c = parseInt(d.charCodeAt(i)); h = ((h << 6) & 0xfffffff) + c + (c << 14); if ((g = h & 0xfe00000) != 0) h = (h ^ (g >> 21)); } return h; }
Is there any specific reason for hashing a domain in Google Analytics or just for reference?
Any idea is welcome.
karthick
source share