====== Tracking Callbacks ====== ===== Introduction ===== Projekktor provides three different methods for trackingdata delivery: Javascript Function Callback, POST actions and a pre configured [[http://www.piwik.org|PIWIK]] API call. ===== PIWIK ===== > Piwik is an open source web analytics software. It gives interesting reports on your website visitors, your popular pages, the search engines keywords they used, the language they speak… and so much more. Piwik is very mighty, fast, easy to handle, available as Open Source under GPL and as such the perfect solution for all your visitor tracking needs. To enable PIWIK tracking set [[configvars#viewer_tracking_and_visitor_statistics|track_type]] to //piwik// and make sure that the //[[configvars#viewer_tracking_and_visitor_statistics|track_dest]]// configuration parameter contains an URL which points to your PIWIK tracking endpoint (piwik.php). For Piwik release 0.2.26 and assumed your piwik installation e.g. resides at http://www.mypiwik.org/piwik this will be http://www.mypiwik.org/piwik/piwik.php. Last but not least log in to PIWIK, go to /Settings/Sites/ and add a new site-project. Make sure that the URL is set to your projekktor.swf´s home URL. Hit "save", fetch the new siteID and set [[configvars#viewer_tracking_and_visitor_statistics|track_piwik_id]] accordingly. Since PIWIK is intended for use with //classic// websites Projekktor has to trick a little to squeeze meaningful data into this great analytics engine. To do so the player emulates a directory structure where videofiles do life in channelfolders. Lets take the following REEL.XML as an example: demochannel my_logo.png http://www.projekktor.com/demo/ my_content/sample_video.flv video_1 Sample Video: Copy 1 flv 06.10.08 my_content/sample_image_1.png my_info.html my_content/sample_video.flv video_2 Second Copy flv 06.10.08 my_content/sample_image_2.png my_info.html my_content/sample_video.flv video_3 Third Video flv 06.10.08 my_content/sample_image_3.png my_info.html If a viewer begins to watch the first video in line ("Sample Video: Copy 1") the player will tell PIWIK that a page at //http://yourplayerdomain.com/demochannel/Sample Video: Copy 1// has been visited. It is possible to get rid of the //demochannel//-root-folder by setting [[/configvars#viewer_tracking_and_visitor_statistics|track_piwik_prefix]] to //false// which you might prefer if you do operate only a single channel setup on your website. This will result in //http://yourplayerdomain.com/Sample Video: Copy 1// then. {{:projekktor:piwik_tracking_1.jpg|EXAMPLE}} If you need to post process the statistical data provided by PIWIK you may find [[configvars#viewer_tracking_and_visitor_statistics|track_piwik_titles]] useful. If set to //false// the player will use the video- and channel- IDs instead of the human readable titles. This way you do not need to map item titles into IDs later on. Furthermore tracking by IDs is a but more accurate in some cases since the player makes sure that IDs provided in your REEL.XML are UNIQUE while this check is not done for any title string. In addion to the above mentioned structure there are four more special folders emulated: 'permalinks', 'infopages', 'favorites' and 'embedd'. Whenever a viewer clicks onto the player´s //video details// button this action is tracked and the corresponding video virtually put into the folder //infopages//. Respectively same applies for //permalinks// once a user snatches the permalink for a video, //favorites// a video item or gets the 'embedd' code. All external resources opened through the //video details// or the //channel homepage//-button are tracked as //Outlinks//. Any other data compiled by PIWIK will be like for any other regular webpage but with two exceptions: All actions are tracked as //direct entries// which means that no searchengine-keywords and incoming referers are tracked. Currently this is a tribute to some FLASH security restrictions. Furthermore and as a special feature the screen-resolutions as shown in //Visitors/Settings// represent the size of the watched video itself and not the real screen-resolution.