javascript - BrightCove with DTM in Dynamic Tag Management -


i facing issue bright cove video events. bright cove video events – able log video events in console unable map adobe analytics. please see screenshot below shows events logged console when action has been taken user on video highlighted in yellow:

also, in dtm have created tag same under page load -trigger rule- onload - open editor below mention code have shared.

try{ if(videojs('te-brightcove-trigger-video_html5_api')){ videojs('te-brightcove-trigger-video_html5_api').on('play',function(){   var myplayer = this;     console.log('play');   var whereyouat = myplayer.currenttime();   var vidduration = myplayer.mediainfo.duration;   console.log('log'+ whereyouat);    console.log('log11'+ vidduration);   if(whereyouat==(vidduration/4)){   }    _satellite.notify("video - play - "+myplayer.mediainfo.name + ", "+whereyouat, 3);         var c = s_gi(_satellite.getvar("settings_aa_reportsuite")).media;   }); videojs('te-brightcove-trigger-video_html5_api').on('pause',function(){      console.log('pause');  }); videojs('te-brightcove-trigger-video_html5_api').on('ended',function(){     console.log('ended');  }); videojs('te-brightcove-trigger-video_html5_api').on('progress',function(){     console.log('progress');  })}; } catch(err){ console.log('error in:' + err); }      _satellite.notify("@load - media module - start", 3);   // set media module s.loadmodule("media");   s.media.autotrack = false; s.media.trackusingcontextdata = true; s.media.trackvars = s.linktrackvars; s.media.trackevents = "event21,event22,event23,event24,event41,event42,event43"; s.media.trackmilestones="25,50,75"; s.media.segmentbymilestones = true;   s.media.contextdatamapping = {   "a.media.name": "evar21,prop21",   "a.media.segment": "evar22",   "a.contenttype": "evar23",   "a.media.timeplayed": "event21",   "a.media.view": "event22",   "a.media.segmentview": "event24",   "a.media.complete": "event23",   "a.media.milestones": {     "25": "event41",     "50": "event42",     "75": "event43"   } };   s.media.monitor = function (s, media){   if (media.event == 'play' || media.event == 'pause') { _satellite.notify("media monitor - event "+media.event, 3);     s.media.track(media.name); _satellite.notify("media monitor - tracked "+media.event, 3); }  };  _satellite.notify("@load - media module - end", 3);  

it great if can on that.

enter image description here

i tried adding video measurement script our video player didn't work me, went ahead , found alternative same. if you're using adobe dtm deploy adobe analytics, can use direct call rules here. example: can call methods provided bright clove player api , pass values it.

videojs('te-brightcove-trigger-video_html5_api').on('pause',function(){      console.log('pause');     _satellite.track("pause"); 

create direct call rule , add condition string 'pause' , fire required events. same solution can built upon milestones , other video player events.


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -