支援Adobe Analytics追蹤

自訂追蹤

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

若要與協力廠商分析系統整合,請務必監聽 trackEvent 檢視器回呼並處理 eventInfo 必要時,回呼函式的引數。 下列程式碼是此類處理常式函式的範例:

var carouselViewer = new s7viewers.CarouselViewer({
 "containerId":"s7viewer",
"params":{
 "asset":"/content/dam/dm-public-facing-live-demo-page/04_shoppable_carousel/05_shoppable_banner",
 "serverurl":"https://adobedemo62-h.assetsadobe.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
}
}
}
});

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

SDK使用者事件

傳送時間……

LOAD

檢視器會先載入。

橫幅

輪播橫幅影像已變更。

HREF

使用者會啟動熱點。

本頁內容