15
15
* Has to be directly on window object
16
16
* @public
17
17
*/
18
+
18
19
window . setAgnitioPlatform = function ( data ) {
19
20
var info = JSON . parse ( data ) ;
20
21
window . agnitioInfo = info ;
@@ -26,7 +27,7 @@ window.setAgnitioPlatform = function(data) {
26
27
// Create the global Agnitio namespace 'ag'
27
28
var ag = window . ag || { } ;
28
29
29
- var api_version = '1.6.3 ' ,
30
+ var api_version = '1.6.4 ' ,
30
31
customInvoke = false ,
31
32
appInterface = null ,
32
33
ua = navigator . userAgent ,
@@ -811,35 +812,39 @@ window.setAgnitioPlatform = function(data) {
811
812
* @private
812
813
*/
813
814
function slideExit ( ) {
814
-
815
- var data , now ;
816
-
817
815
if ( ! currentSlideId ) { return ; }
818
816
819
- now = timestamp ( ) ;
820
-
821
- data = {
822
- type : "system" ,
823
- categoryId : null ,
824
- category : "slideExit" ,
825
- labelId : "id" ,
826
- label : "name" ,
827
- valueId : currentSlideId ,
828
- value : undefined ,
829
- valueType : undefined ,
830
- time : now ,
831
- slideIndex : undefined ,
832
- slidePath : undefined ,
833
- chapterName :undefined ,
834
- chapterId : undefined ,
835
- subChapterName : undefined ,
836
- subChapterId : undefined
817
+ var monitoringData ,
818
+ now = timestamp ( ) ,
819
+ chapterName = currentData . chapter || null ,
820
+ chapterId = currentData . chapterId || null ,
821
+ subChapterName = currentData . subChapter || null ,
822
+ subChapterId = currentData . subChapterId || null ,
823
+ slideIndex = currentData . slideIndex || null ,
824
+ slidePath = currentData . path || null ,
825
+
826
+ monitoringData = {
827
+ type : "system" ,
828
+ categoryId : null ,
829
+ category : "slideExit" ,
830
+ labelId : "id" ,
831
+ label : "name" ,
832
+ valueId : currentSlideId ,
833
+ value : currentData . name ,
834
+ valueType : null ,
835
+ time : now ,
836
+ slideIndex : slideIndex ,
837
+ slidePath : slidePath ,
838
+ chapterName : chapterName ,
839
+ chapterId : chapterId ,
840
+ subChapterName : subChapterName ,
841
+ subChapterId : subChapterId
837
842
} ;
838
843
839
844
// Remove current slide
840
845
currentSlideId = null ;
841
846
842
- ag . submit . save ( data ) ;
847
+ ag . submit . save ( monitoringData ) ;
843
848
}
844
849
845
850
/**
0 commit comments