Example #1
0
function ga_parse_cookie()
{
    if (isset($_COOKIE['_ga'])) {
        list($version, $domainDepth, $cid1, $cid2) = explode('.', $_COOKIE["_ga"], 4);
        $contents = array('version' => $version, 'domainDepth' => $domainDepth, 'cid' => $cid1 . '.' . $cid2);
        $cid = $contents['cid'];
    } else {
        $cid = ga_generate_UUID();
    }
    return $cid;
}
function ga_parse_cookie()
{
    $override = apply_filters('pre_ga_parse_cookie', false);
    if ($override !== false) {
        return $override;
    }
    if (isset($_COOKIE['_ga'])) {
        list($version, $domainDepth, $cid1, $cid2) = explode('.', $_COOKIE["_ga"], 4);
        $contents = array('version' => $version, 'domainDepth' => $domainDepth, 'cid' => $cid1 . '.' . $cid2);
        $cid = $contents['cid'];
    } else {
        $cid = ga_generate_UUID();
    }
    return $cid;
}