Why is the domain hashed in Google Analytics?

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.

+7
source share
1 answer

From the docs for _setAllowHash() :

The hashed domain functionality in Google Analytics creates a hash value from your domain and uses this number to verify the integrity of cookies for visitors.

Please note that _setAllowHash deprecated - I don't know if this means that Google Analytics no longer uses the domain hash to validate cookies or something else ...

+1
source

All Articles