ShinyStat Video AnalyticsIf you have the source code of your player, you can set up ShinyStat Video Analytics in a few quick steps.

ShinyStat Video Analytics offers two versions depending on your needs:

  • Javascript version – ideal for:

– JavaScript, Flash and Silverlight players
– Players with different technologies
– Embedding the player within an iFrame

  • Adobe Flash version – ideal for:

– Players using only Adobe Flash technology.
The plugin is downloaded from any domain featuring an embedded player.
– Also ideal for those sites developed using Flash but which need internal video.

To correctly implement ShinyStat Video Analytics on a JavaScript player, the following code must be entered in the source of website pages:

<script src=”http://codicefl.shinystat.com/cgi-bin/getserver.cgi?USER=&CODE=101&RND=123″>
.

→ Plugin creation
Before proceeding, make sure that the plugin is completely downloaded and the initialisation code is present on the page.

To do this, make sure that the ‘codeVAReady’ variable is set to ‘true’ as in the following example:

//plugin creation to load code on the page (codeVAReady==true)
if(codeVAReady){
pluginVA = new videoAnalytics();
}

→ loadVideoAnalytics: initialisation function
After a ‘VideoAnalytics ()’ class instance is created, it must be initialised using the loadVideoAnalytics funtion with the following parameters:

Parameter Description
USER ShinyStat User
VIDEO ID unique video ID
FILE VIDEO URL full video url
TIT VIDEO title assigned to video
CATEGORY ID video category ID (see account configuration panel*)

____________________________________________________________________________________________________________

*Enter the ID of the category you want to associate with the video, shown in the “Video Category management” panel, by clicking on “Manage Account”>”configuration”>”Configure Video Categories” on the left menu. If you want to create categories to obtain data relating to groups of videos, we recommend setting it up before implementing the code.

____________________________________________________________________________________________________________

//configuration function, to be called after plugin creation
pluginVA.loadVideoAnalytics(USER,ID VIDEO, VIDEO FILE URL,TIT VIDEO, CATEGORY ID,’ ‘,0);

Warning: the last two parameters should be unchanged (…,’ ‘,0) in the empty string and 0.

→ Configuration function

Function to be used on “Play” video

This function must be called when the “Play” button is clicked to start watching and after a stop event.
start(time)
time = DURATION_VIDEO
IMPORTANT: the DURATION_VIDEO variable should always be specified in milliseconds
// Function to call at the video start only if duration video is increased
pluginVA.start(DURATION_VIDEO);

stop: start video
Function used to pause/stop video playback.
pluginVA.stop();

seek: start video
Seek function during video playback.
//Seek function
pluginVA.setCurrentTime(CURRENT_TIME);
IMPORTANT: The CURRENT_TIME variable should always be specified in milliseconds

Reset plugin for video playlist
If consecutive videos are present in the same player, the following functions should be called, in order:
pluginVA.stop();
pluginVA.resetPlugin();
followed by function:
//configuration function to be called after plugin creation
pluginVA.loadVideoAnalytics(USER,ID VIDEO, VIDEO FILE URL,TIT VIDEO, CATEGORY ID,’ ‘,TIPO PLAYER);
with the parameters of the new video.