智慧型裁切視訊檢視器支援Adobe Analytics立即可用的追蹤功能。
智慧型裁切視訊檢視器支援Adobe Analytics立即可用的追蹤功能。
若要啟用追蹤,請將適當的公司預設集名稱傳遞為 config2
引數。
檢視器也會傳送單一追蹤HTTP要求至已設定的影像伺服器,並提供檢視器型別和版本資訊。
若要與協力廠商分析系統整合,您必須監聽 trackEvent
檢視器回呼和處理 eventInfo
必要時,回呼函式的引數。 下列程式碼是此類處理常式函式的範例:
var smartCropVideoViewer = new s7viewers.SmartCropVideoViewer({
"containerId":"s7viewer",
"params":{
"asset":"html5automation/frisbee-AVS",
"serverurl":"http://s7d1.scene7.com/is/image/",
"videoserverurl":"http://s7d1.scene7.com/is/content/"
},
"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 |
檢視器會先載入。 |
SWAP |
在檢視器中交換資產時,使用 setAsset() API。 |
PLAY |
播放已開始。 |
PAUSE |
播放已暫停。 |
STOP |
播放已停止。 |
MILESTONE |
播放達到下列其中一個毫石: 0%、25%、50%、75%和100%。 |