function getCookie(name){
var matches = document.cookie.match(new RegExp(
"(?:^|; )" + name.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, '\\$1') + "=([^;]*)"
));
return matches ? decodeURIComponent(matches[1]) : undefined;
}
var cidLong = getCookie('_ga');
var tmp = cidLong.split('.');
var cid = tmp[2] + '.' + tmp[3];
console.log(cid);