支援Adobe Analytics追蹤

依預設,檢視器會傳送單一追蹤HTTP要求給已設定的影像伺服器,並包含檢視器類型和版本資訊。

自訂追蹤

若要與協力廠商分析系統整合,必須監聽trackEvent檢視器回呼,並視需要處理回呼函式的eventInfo引數。 以下代碼是此類處理程式函式的示例:

var interactiveVideoViewer = new s7viewers.InteractiveVideoViewer({ 
 "containerId":"s7viewer", 
"params":{ 
 "asset":"/content/dam/mac/aodmarketingna/dm-viewers-content/video/Glacier.mp4", 
"config":"/etc/dam/presets/viewer/Shoppable_Video_Dark", 
 "serverurl":"https://aodmarketingna.assetsadobe.com/is/image/", 
 "videoserverurl":"https://gateway-na.assetsadobe.com/DMGateway/public/aodmarketingna", 
 "contenturl":"https://aodmarketingna.assetsadobe.com/", 
"interactivedata":"is/content/content/dam/mac/aodmarketingna/_VTT/dm-viewers-content/video/Glacier.mp4.svideo.vtt" 
}, 
"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; 
   case "INTERACTIVE_SWATCH": 
    //custom event processing code which handles user clicks on interactive swatches 
    break; 
   //additional cases for other events 
} 
} 
} 
});

檢視器會追蹤下列SDK使用者事件:

SDK使用者事件

已傳送...

LOAD

當檢視器先載入時。

SWAP

使用 setAsset() API在檢視器中交換資產時。

PLAY

播放開始時。

PAUSE

播放暫停時。

STOP

當播放停止時。

MILESTONE

播放到達下列里程碑之一時:0%、25%、50%、75%或100%。

INTERACTIVE_SWATCH

每次使用者按互動式色票時。

本頁內容