How to measure audience using jplayer pluggin

129 views
Skip to first unread message

Luis Mendes

unread,
Mar 20, 2014, 5:20:06 AM3/20/14
to jpl...@googlegroups.com
Hello,
I'm building a radio plugin onto my website and I would like to measure the amount of people listening to the radio stream.
I've been checking on the API events of the jplayer pluggin, namely Progress and TimeUpdate, to find a way to measure the total audience in a given time. Does anyone knows how to do it? It's a bit trick this one!
Thanks in advance, cheers!

Mark Panaghiston

unread,
Mar 20, 2014, 4:44:06 PM3/20/14
to jpl...@googlegroups.com
You could use Google Analytics events generated in the jPlayer: play, pause and ended events.

Marc Dingena

unread,
Mar 21, 2014, 3:48:52 PM3/21/14
to jpl...@googlegroups.com
$('#jPlayer').bind($.jPlayer.event.play, function (event) {
    // you probably already have this handler in your javaScript code, just find it, and insert the row below (provided that you are using the new ga.js from Google Analytics)
    ga( 'send', 'event', 'jPlayer', 'Play' );
});

You can do the same for the other jPlayer events.
Reply all
Reply to author
Forward
0 new messages