getClientID
Get the site user ID assigned by Yandex Metrica.
Warning
Working with the JavaScript API requires knowledge of HTML and JavaScript. If you don’t know these languages, contact your website developer or webmaster.
ym(XXXXXX, 'getClientID', function(clientID) {
<function body>
});
Response format:
"12345"
where
XXXXXX
— Counter number.12345
is a string value.
Examples
ym(XXXXXX, 'getClientID', function(clientID) {
document.getElementById('clientID').value = clientID;
});
var yaID;
ym(XXXXXXX, 'getClientID', function(clientID) {
yaID = clientID});
The ClientID
value will be recorded in the yaID variable.
Useful links |
Online training |
Unique website session ID created automatically by Yandex Metrica.
Was the article helpful?
Previous
Next