Instrumenting a viewer using the Adobe Analytics Instrumentation Kit

You can use the Adobe Analytics Instrumentation Kit to integrate an HTML5 viewer with Adobe Analytics.

If you use any of the predefined Dynamic Media Classic HTML5 viewer presets, they already contain all the implementation code to send data to Adobe Analytics; no further instrumentation is required by you.

Set up Adobe Analytics tracking from Dynamic Media Classic

For all HTML5 viewers, add the following JavaScript™ to the HTML container, usually in the <head> element:

<!-- ***** Adobe Analytics Tracking ***** --><script type="text/javascript" src="https://s7d6.scene7.com/s7viewers/s_code.jsp?company=<Dynamic Media Classic Company ID>&preset=companypreset-1"></script>

Where Dynamic Media Classic Company ID is set to the Dynamic Media Classic company name. And &preset is optional unless the company preset name is not companypreset. In such cases, it could be companypreset-1, companypreset-2, and so on. The higher number is a newer instance of the preset. To determine the correct company preset value name, click Copy URL , and then look at the preset=parameter to find the company preset name.

Continuing, now add a function that transmits the viewer event to the Adobe Analytics tracking code.

Add the s7ComponentEvent() function to the container HTML (or JSP, or ASPX or other):

function s7ComponentEvent(objectId, componentClass, instanceName, timeStamp, eventData) {     s7track(eventData); }

The function name is case-sensitive. The only parameter passed to s7componentEventthat is required is the last one: eventData. Where s7track() is defined in s_code.jsp included above. And s7track handles all tracking per each event. (To further customize data transmitted to Adobe Analytics, this area is the place to do it.)

Enabling HREF and ITEM events

You can enable HREF (rollover) and ITEM (mouse clicks/touch) events in the viewers through Image Map editing. Define the identifiers for the HREF and ITEM within the Image Map that is associated with viewer content. Add a &rolloverKey= parameter to the HREF value within the Image Map.

On this page

Adobe Summit Banner

A virtual event April 27-28.

Expand your skills and get inspired.

Register for free
Adobe Summit Banner

A virtual event April 27-28.

Expand your skills and get inspired.

Register for free
Adobe Maker Awards Banner

Time to shine!

Apply now for the 2021 Adobe Experience Maker Awards.

Apply now
Adobe Maker Awards Banner

Time to shine!

Apply now for the 2021 Adobe Experience Maker Awards.

Apply now