Google Analytics Plugin
There is no special setup for this advanced plugin!
Enough is if you have Google Analytics account or going to signup for this service
and put Analytics code on your website according to Google instruction.
Many webmasters already have such code on their websites...
What can be tracked by Nuevoplayer plugin & Goggle Analayics?
|
each video start event
each video completed event
each video replay event
each video time jump (optional)
each preroll ad start
each preroll ad clicked
each postroll ad start
each postroll ad clicked
each midroll ad show
each midroll ad clicked
each overlay ad show
each overlay ad clicked
each guide video clicked (with video title)
|
How it looks in Google Analytics?
Click for fullsize
In Short:
- login to your Google Analytics account
- click 'View Report' for domain with Nuevoplayer
- click 'Content' and next 'Top Content' on left
- enter 'Nuevoplayer' in filter field with 'Containing' option selected.
In this easy way you will be able to track all Nuevoplayer's events.
Of course you can narrow filter value,
eg. to 'Nuevoplayer/Video Start' or any other tracking event.
|
Check small DEMO of javascript integration
There are 2 ways of communication with Nuevoplayer using Javascript.
1. Sending and 2.Receiving information.
In both cases first we need to Nuevoplayer flash object by object's ID.
By default we set such object's ID name to "nuevoplayer", but you may set whatever name.
Below is example of javascript function that can send many events to Nuevoplayer
function send_event ( ev, val ) {
var player = document.getElementById ( 'nuevoplayer' );
if ( val ) {
player.sendEvent ( ev, val );
} else {
player.sendEvent ( ev );
}
}
|
Possible events to sent are:
|
play eg. send_event ( 'play' )
pause eg. send_event ('pause' )
stop eg. send_event ( 'stop' )
volume eg. send_event ( 'volume' , '80' ) / range 0-100
scrub eg. send_event ( 'scrub' , '120' ) / time in seconds
playitem
eg. send_event ( 'playitem' , '2' ); /set video item number to play from playlist
|
So example
html link can be:
<a href="javascript:send_event( 'volume' , 0 )">Mute volume</a>
It is also possible to load new video to Nuevoplayer using javascript.
HTML link can be like:
<a href="javascript:loadVideo('full video URL here')">Video title</a>
And small javascript function:
function loadVideo ( url ) {
var player = document.getElementById ( 'nuevoplayer' );
player.loadFile ( { file:url } );
player.sendEvent ( 'play' );
}
|
Other aspect of using javascript is to receive information coming from Nuevoplayer.
Below you can find example of javascript function that reads coming events.
function playerUpdate( call, v1, v2 )
{
if ( call == 'time' ) {
var currentPosition = v1;
var timeRemaining = v2;
}
if ( call == 'volume' ) {
var currentVolume = v1;
}
if ( call == 'item' ) {
var currentItem = v1;
}
if ( call == 'state' ) {
var currentState = v1;
}
}
|
call value is the name of event you want to track.
Available calls are:
time,
item,
state,
volume
Player available
state values are: PAUSED, BUFFERING, PLAYING, COMPLETE, NO STATE