Support for Adobe Analytics tracking

Last update: 2022-03-09
  • Created for:
  • Developer

The Spin Viewer supports Adobe Analytics tracking out of the box.

Out-of-the-box tracking

The Spin Viewer supports Adobe Analytics tracking out-of-the-box.

To enable tracking, pass the proper company preset name as config2 parameter.

The viewer also sends a single tracking HTTP request to the configured Image Server with the viewer type and version information.

Custom tracking

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 spinViewer = new s7viewers.SpinViewer({
 "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.


an asset is swapped in the viewer using the setAsset() API.


an image is zoomed.


an image is panned.


a spin is performed.

On this page