setUserID

Tip. Working with the JavaScript API requires knowledge of HTML and JavaScript. If you don't know these languages, 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.

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