In order to track customized monitoring items:
- Define a monitoring attribute ID, (attribute IDs less than 8000 are reserved). For more information, see Defining the store's monitoring list.
- Define a JavaScript variable in the Sametime.js file to save the attribute ID and value, and allow access from all the frames. For example: var myTrackAttributeId=8001; var myTrackAttributeValue="anything";
- Add JavaScript code to assign or update the value for this variable in store pages. For example: top.myTrackAttributeValue="new Value";
- . Call the setWcsAttribute() method of the applet to update the attribute in changeSTAttributes() function in the Sametime.js file:
function changeSTAttributes() { if(CustomerAppletIsUp) { sametime.document.applets["InteractivePresenceApplet"].setWcsAttribute(myTrackAttributeId,myTrackAttributeValue); sametime.document.applets["InteractivePresenceApplet"].changeWCSAttrs(); } else setTimeout("changeSTAttributes()",3000); // wait for 3 sec and try again }
Note: Insert your code before the changeWCSAttrs() method.