The eCatalog Viewer supports Adobe Analytics tracking out of the box.
The eCatalog 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.
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 eCatalogViewer = new s7viewers.eCatalogViewer({
"containerId":"s7viewer",
"params":{
"asset":"Viewers/Pluralist",
"serverurl":"https://s7d1.scene7.com/is/image/"
},
"handlers":{
"trackEvent":function(objID, compClass, instName, timeStamp, eventInfo) {
//identify event type
var eventType = eventInfo.split(",")[0];
switch (eventType) {
case "LOAD":
//custom event processing code
break;
//additional cases for other events
}
}
}
});
The viewer tracks the following SDK user events:
SDK user event |
Sent when... |
---|---|
LOAD |
viewer is loaded first. |
SWAP |
an asset is swapped in the viewer using the setAsset() API. |
ZOOM |
an image is zoomed. |
PAN |
an image is panned. |
SWATCH |
an image is change by clicking or tapping on a swatch. |
PAGE |
a current frame is changed in the main view. |
ITEM |
an info panel pop-up is activated. |
HREF |
a user navigates to a different page because of clicking the image map. |