Answer the question
In order to leave comments, you need to log in
There are no custom definitions in Google Analytics, where can I get them?
Hello!
There are no custom definitions in Google Analytics, where can I get them?
Answer the question
In order to leave comments, you need to log in
The solution to the problem, without problems:
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);
Custom dimensions and metrics are only available in properties that use Universal Analytics or have at least one app data view
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question