setUserID

Tip. Working with the JavaScript API requires knowledge of HTML and JavaScript. If you don't have these skills, contact your website developer or webmaster.

Transmitting the site user ID set by the site owner.

ym(XXXXXX, 'setUserID', "12345");

where

  • XXXXXX is the tag ID.
  • 12345 is a string value.

Your website user ID is associated with the ClientID of a particular user only if the setUserID method was called during the user's session. To get more complete statistics, we recommend waiting some time until a larger volume of data is transmitted to Yandex.Metrica.

Note. To see UserID values in reports, transmit them using user parameters.