Support for analytics tracking support-for-analytics-tracking

Custom tracking section-cda48fc9730142d0bb3326bac7df3271

By default, the viewer sends a single tracking HTTP request to configured Image Server with the viewer type and version information.

To integrate with third-party analytics systems, it is necessary to listen to the trackEvent viewer callback and process the eventInfo argument of the callback function as necessary. The following code is an example of such handler function:

var interactiveImage = new s7viewers.InteractiveImage({
 "trackEvent":function(objID, compClass, instName, timeStamp, eventInfo) {
  //identify event type
  var eventType = eventInfo.split(",")[0];
  switch (eventType) {
   case "LOAD":
    //custom event processing code
   //additional cases for other events

The viewer tracks the following SDK user events:

SDK user event
Sent when...
viewer is loaded first.
user activates hotspot.