ga(function(tracker) { var clientId = tracker.get('clientId'); });
function gaParseCookie() {
if (isset($_COOKIE['_ga'])) {
list($version,$domainDepth, $cid1, $cid2) = explode('.', $_COOKIE["_ga"]);
$cid = $cid1.'.'.$cid2;
}
else $cid = gaGenUUID();
return $cid;
}
function()
{
var match = document.cookie.match('(?:^|;)\\s*_ga=([^;]*)');
var raw = (match) ? decodeURIComponent(match[1]) : null;
if (raw)
{
match = raw.match(/(\d+\.\d+)$/);
}
var gacid = (match) ? match[1] : null;
if (gacid)
{
return gacid;
}
}
function() {
try {
var cookie = {{ga cookie}}.split(".");
return cookie[2] + "." + cookie[3];
} catch(e) {
console.log("No Universal Analytics cookie found");
return "n/a";
}
}