// After ust.min.js include snippet
// Example: User will be recorded
UST.onTrackingStarted = function() {
console.log('Creating session...!');
// Example: New session has been created with an unique clientID
UST.onSessionCreated = function(clientID) {
console.log('New session created for client', clientID);
// Example: whenever a tag is added, add the same tag + current pageID
UST.onTagAdded = function(tag) {
if (tag === 'AddToCart' || tag === 'Converted') {
UST.addTag(tag + ';' + sessionStorage.clientPageID);