Tracking Events not being fired
Closed this issue · 5 comments
Certain tracking events present in my vast xml are never being fired. These events include fullscreen/exitfullscreen, mute/unmute, and skip (maybe it works, but I cannot skip the ad event after removing 'controls' attr from my video element). I've been stuck on this for quite awhile..
Anyone got any ideas on how to help?
@wroberts15 Do you have an example vast tag url that I can use to test skip ad?
I've noticed the skip ad issue but have don't have an ad that always provides the skip functionality.
This is my attempt so far around line 160
errorFn = function() {
// Inform ad server we couldn't play the media file for this ad
vast.util.track(player.vastTracker.ad.errorURLTemplates, {ERRORCODE: 405});
errorOccurred = true;
player.trigger('ended');
},
muteFn = function() {
player.vastTracker.setMuted("mute");
},
unmuteFn = function() {
player.vastTracker.setMuted("unmute");
};
player.on('canplay', canplayFn);
player.on('timeupdate', timeupdateFn);
player.on('pause', pauseFn);
player.on('error', errorFn);
// wroberts15
player.on('mute', muteFn);
player.on('unmute', unmuteFn);
I can post the vast in a moment
<?xml version="1.0" encoding="UTF-8"?>
<VAST xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.0">
<Ad id="1">
<InLine>
<AdSystem>intranet</AdSystem>
<AdTitle><![CDATA[HTTP -1]]></AdTitle>
<Impression><![CDATA[http://example.com/p?exmple1=[campaign-id1]&ex5=[creative-id]&ex6=[ad-placement-id]&c6=[impression]]]></Impression>
<Creatives>
<Creative>
<Linear>
<Duration>00:00:30</Duration>
<MediaFiles>
<MediaFile delivery="streaming" type="video/mp4" scalable="true"><![CDATA[http://office.intranet.com/tests/html5_tests/tests/static/pepsi_vs_coca.mp4]]></MediaFile>
<MediaFile delivery="progressive" type="video/webm" scalable="true"><![CDATA[http://office.intranet.com/tests/html5_tests/tests/static/pepsi_vs_coca.webm]]></MediaFile>
</MediaFiles>
<TrackingEvents>
<Tracking event="start"><![CDATA[http://example.com/p?exmple1=[campaign]&ex5=[creative-id]&ex6=[ad-start-id]&c6=[start]]]></Tracking>
<Tracking event="pause"><![CDATA[http://example.com/p?exmple1=[campaign]&ex5=[creative-id]&ex6=[ad-pause-id]&c6=[pause]]]></Tracking>
<Tracking event="resume"><![CDATA[http://example.com/p?exmple1=[campaign]&ex5=[creative-id]&ex6=[ad-resume-id]&c6=[resume]]]></Tracking>
<Tracking event="firstQuartile"><![CDATA[http://example.com/p?exmple1=[campaign]&ex5=[creative-id]&ex6=[ad-firstq-id]&c6=[firstQuartile]]]></Tracking>
<Tracking event="midpoint"><![CDATA[http://example.com/p?exmple1=[campaign]&ex5=[creative-id]&ex6=[ad-midpoint-id]&c6=[midpoint]]]></Tracking>
<Tracking event="thirdQuartile"><![CDATA[http://example.com/p?exmple1=[campaign]&ex5=[creative-id]&ex6=[ad-thirdq-id]&c6=[thirdQuartile]]]></Tracking>
<Tracking event="complete"><![CDATA[http://example.com/p?exmple1=[campaign]&ex5=[creative-id]&ex6=[ad-complete-id]&c6=[complete]]]></Tracking>
<Tracking event="skip"><![CDATA[http://example.com/p?exmple1=[campaign]&ex5=[creative-id]&ex6=[ad-skip-id]&c6=[skip]]]></Tracking>
<Tracking event="mute"><![CDATA[http://example.com/p?exmple1=[campaign]&ex5=[creative-id]&ex6=[ad-mute-id]&c6=[mute]]]></Tracking>
<Tracking event="unmute"><![CDATA[http://example.com/p?exmple1=[campaign]&ex5=[creative-id]&ex6=[ad-unmute-id]&c6=[unmute]]]></Tracking>
<Tracking event="fullscreen"><![CDATA[http://example.com/p?exmple1=[campaign]&ex5=[creative-id]&ex6=[ad-fullscrn-id]&c6=[fullscreen]]]></Tracking>
<Tracking event="exitfullscreen"><![CDATA[http://example.com/p?exmple1=[campaign]&ex5=[creative-id]&ex6=[ad-exitfs-id]&c6=[exitfullscreen]]]></Tracking>
</TrackingEvents>
<VideoClicks>
<ClickThrough><![CDATA[http://www.intranet.com]]></ClickThrough>
<ClickTracking><![CDATA[http://example.com/p?exmple1=[campaign-id1]&ex5=[creative-id]&ex6=[ad-placement-id]&c6=[click-thru]]]></ClickTracking>
</VideoClicks>
</Linear>
</Creative>
</Creatives>
</InLine>
</Ad>
</VAST>
Still working through the issues but looks like player.on('mute', muteFn);
will work if you listen to volumechange, --> player.on('volumechange', muteFn);
just need to figure out what the actual volume is