2

I see the new JW Player 6 Enterprise has lost the capability to report Seconds Played and Percentage Played as Google Analytics Events.

Has anyone developed a method to produce something like this? I imagine the JW Player API and some JavaScript could support these events.

[We made great use of the Seconds Played and Percentage Played capabilities in JW Player 5, and I'm sad to see it go. If anyone from JWPlayer is listening: it would be great to have those events back!]

mlevy
  • 87
  • 6
  • 1
    The reason they were removed is because in html5 mode, which is now primary, the data is not correct, in jw5, in html5 mode, it had issues with these events, and worked great in flash mode. – emaxsaun Oct 03 '14 at 21:30
  • @EthanJWPlayer could you explain further how/why the HTML5 data is not correct? – Justin Feb 26 '15 at 20:06
  • @Justin - This was removed in GAPro in JW6 in December of 2012. I don't have further insight into how the data was not correct, other than from the developers who wrote the GAPro plugin telling me that it wasn't. The person who wrote GAPro for JW5 no longer works here. – emaxsaun Feb 26 '15 at 21:49

1 Answers1

0

I think you could recreate the seconds played tracking on your own with the onTime callback. Try this:

var currentDuration = -1;
var currentPosition = -1;
var jw = jwplayer();
jw.onTime(function() {
    var position = this.getPosition();
    var duration = this.getDuration();
    if ((duration === currentDuration && position === currentPostion) || duration === -1 ) {
      return;
    }
    currentPosition = position;
    currentDuration = duration;
    var file = this.getPlaylistItem().file
    return _gaq.push(['_trackEvent', 'JW Player Seconds Played', file, window.location.href);
});
harmstyler
  • 1,381
  • 11
  • 20