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.

Chat with us

Write an email

Please note: Our support team will never initiate a call to you. Do not follow any instructions of people who call you and introduce themselves as the Yandex Metrica support team.


Unique website session ID created automatically by Yandex Metrica.