The Usetiful script consists of two parts:
<!-- User segmentation start -->
This part is responsible for the segmentation and personalization of the service to anonymous users. It is used for the identification of unique logged-in users.
See how Tags are used for segmentation and personalization.
<!-- User segmentation end -->
<!-- Usetiful script start -->
This part is responsible for the experience layer, interaction with the site, and reporting on user behavior. It uses the variables set up in the previous part.
<!-- Usetiful script end -->
To enable Usetiful recognizing users across multiple devices we will need to provide a unique user ID whenever the Usetiful script is loaded on-page. This is done by customizing the first part of the script.
We introduce a new variable (tag) with the name "userId" into the array usetifulTags. The content of this variable needs to be a unique ID of the logged-in user. If no userID is provided, Usetiful will rely on the browser's local storage contents to serve the content.
Please note - the content of the userId tag must always be a string data type.
Example: