Get 10 most viewed videos
Get a list of the 10 most viewed videos for a timeframe
| Property Name | Description |
|---|---|
| media_id | A unique identifier for the media |
| media_type | Either 'audio' or 'video' |
| media_title | The title of the media |
| times_plays | Number of times the media has been played |
| total_time_viewed | Total amount of time the media has been viewed (in milliseconds) |
| times_embedded | Number of times the media embed code has been copied |
| times_emailed | Number of times the media has been shared via email |
| start_date | Start date of report |
| end_date | End date of report |
Get most viewed channels
Get a list of the most viewed channels for a timeframe
| Property Name | Description |
|---|---|
| channel_id | A unique identifier for the channel |
| channel_title | The title of the channel |
| num_sessions | Number of unique sessions in which the channel has been played at least once |
| num_plays | Number of times the channel has been played (i.e. user clicks on play or channel automatically plays) |
| start_date | Start date of report |
| end_date | End date of report |
Get the top 10 traffic sources
Get a list of the top 10 traffic sources (domains) for a timeframe
| Property Name | Description |
|---|---|
| num_referrer_views | Number of times the media has been played from the referring website |
| referrer_host | Domain of referring website where embedded content has been played |
| start_date | Start date of report |
| end_date | End date of report |
Get full analytics details for media
Get comprehensive media performance metrics
| Property Name | Description |
|---|---|
| media_id | A unique identifier for the media |
| media_type | Either 'audio' or 'video' |
| media_title | The title of the media |
| ref_id | The reference ID of the media. This is typically an internally used media reference ID, possibly from an existing CMS |
| times_plays | Number of times the media has been played |
| total_time_viewed | Total amount of time the media has been viewed (in milliseconds) |
| times_embedded | Number of times the media embed code has been copied |
| times_emailed | Number of times the media has been shared via email |
| start_date | Start date of report |
| end_date | End date of report |
Get full analytics details for channels
Get comprehensive channel performance metrics
| Property Name | Description |
|---|---|
| channel_id | A unique identifier for the channel |
| channel_title | The title of the channel |
| num_sessions | Number of unique sessions in which the channel has been played at least once |
| num_plays | Number of times the channel has been played (i.e. user clicks on play or channel automatically plays) |
| start_date | Start date of report |
| end_date | End date of report |
Get engagement metrics for media
Get a comprehensive listing of media engagement metrics
| Property Name | Description |
|---|---|
| media_id | A unique identifier for the media |
| media_title | The title of the media |
| ref_id | The reference ID of the media. This is typically an internally used media reference ID, possibly from an existing CMS |
| plays | Number of times the media has been played |
| avg_time_played_in_seconds | The total number of played seconds divided by the total number of plays. |
| XX_percent_watched | Represents the number of plays as a relative amount of the total video duration. It is the percentage of the video watched by a viewer (ignoring portions of the video that are 're-watched' or scrubbed back to). The following are reported: 25%, 50%, 75%, 100% |
| segment_XX.X | This is the number of viewers that watched a particular segment within a video. A video is broken into 40 segments where each segment represents 2.5% of the total video duration. The 40 segments are used to plot the dropoff graph. |
Get usage information for an account
Get bandwidth and storage usage data
| Property Name | Description |
|---|---|
| time | Unix time, represented as the number of seconds since the Unix epoch at which the report starts |
| storage_in_megabytes | Storage used (in megabytes) |
| bandwidth_in_megabytes | Bandwidth used (in megabytes) |
| interval | Span of time for which the report contains data: daily, monthly, or yearly |
| Org ID: | bfb3caa8e6204fea9a23ce855768fc93 |
| Access Key: | esU4jGTelX8UAsfaiWUcjWsn1mY= |
| Secret: | +IEbSWOctQhnMi7DGop9KdPysqw= |
| Expires: | 1298347550 |
| Start: | 1262304000 |
| Span: | monthly |
http://api.delvenetworks.com/rest/organizations/bfb3caa8e6204fea9a23ce855768fc93/analytics/report/usage.xml
get|api.delvenetworks.com|/rest/organizations/bfb3caa8e6204fea9a23ce855768fc93/analytics/report/usage.xml|
get|api.delvenetworks.com|/rest/organizations/bfb3caa8e6204fea9a23ce855768fc93/analytics/report/usage.xml|access_key=esU4jGTelX8UAsfaiWUcjWsn1mY=&expires=1298347550&span=monthly&start=1262304000
oNo+t/o7DNBPUTKyRCiUiz9/t4d51a9/RgDHGLqB+6M=
http://api.delvenetworks.com/rest/organizations/bfb3caa8e6204fea9a23ce855768fc93/analytics/report/usage.xml?access_key=esU4jGTelX8UAsfaiWUcjWsn1mY%3D&expires=1298347550&span=monthly&start=1262304000&signature=oNo%2Bt%2Fo7DNBPUTKyRCiUiz9%2Ft4d51a9%2FRgDHGLqB%2B6M%3D
| PHP | LvpAuthUtil.php |
| Ruby | LvpAuthUtil.rb |
| Java | LvpAuthUtil.java |
| C# | LvpAuthUtil.cs |
| VB | LvpAuthUtil.vb |
| Python | LvpAuthUtil.py |
$access_key = "<INSERT_YOUR_ACCESS_KEY>";
$secret = "<INSERT_YOUR_SECRET>";
$org_id = "<INSERT_YOUR_ORG_ID>";
$url =
"http://api.delvenetworks.com/rest/organizations/$org_id/analytics
/overview/media";
$signed_request = DelveAuthUtil::authenticate_request("GET", $request, $access_key, $secret);
$response = file_get_contents($signed_request);
$media_overview = json_decode($response);
$first_media = $media_overview[0];
echo("'" . $first_media -> media_title . "' has been watched " . $first_media -> times_views . " times.
");
<?php
$access_key = "<INSERT_YOUR_ACCESS_KEY>";
$secret = "<INSERT_YOUR_SECRET>";
$org_id = "<INSERT_YOUR_ORG_ID>";
# these parameters are optional but in this example we illustrate their usage
$span = "monthly";
$start = <ENTER A DESIRED UNIX START TIME>;
$get_usage_info_url = 'http://api.delvenetworks.com/rest/organizations/' .$org_id .'/analytics/report/usage.xml';
# obtain a signature for getting the usage info
$signed_get_usage_info_url = DelveAuthUtil::authenticate_request("GET", $get_usage_info_url, $access_key, $secret, array("span" => $span, "start" => $start));
?>
$response = file_get_contents($signed_get_usage_info_url); # display the result of the above GET echo $response;
<records type="array">
<record>
<media-id>db0713f8f58a4828b02601758a74be17</media-id>
<media-type>Video</media-type>
<media-title>Dinosaur_Jr.: Over It - Music Video</media-title>
<times-plays type="integer">100</times-plays>
<total-time-viewed type="integer">7714048</total-time-viewed>
<times-embedded type="integer">1</times-embedded>
<times-emailed type="integer">0</times-emailed>
<start-date type="integer">0</start-date>
<end-date type="integer">1253516400000</end-date>
</record>
<record>
<media-id>7cd25946e64e48d1a75dfa58a5ccc533</media-id>
<media-type>Video</media-type>
<media-title>Draft Profile: Donald Washington</media-title>
<times-plays type="integer">9</times-plays>
<total-time-viewed type="integer">316738</total-time-viewed>
<times-embedded type="integer">0</times-embedded>
<times-emailed type="integer">0</times-emailed>
<start-date type="integer">0</start-date>
<end-date type="integer">1253516400000</end-date>
</record>
</records>
$response = request_cache($request, $cache_fullpath,$cache_timeout);
$request = 'http://api.delvenetworks.com/rest/organizations/7fd6def47cde 4d5694f9b16bfa04c521/media.xml'; $cache_fullpath = '/mydir/ImageMad1'; $cache_timeout = 7200;
function request_cache($url, $dest_file, $timeout) {
if (!file_exists($dest_file) || filemtime($dest_file) < (time()-$timeout)) {
$data = file_get_contents($url);
$tmpf = tempnam('/tmp','YWS');
$fp = fopen($tmpf,"w");
fwrite($fp, $data);
fclose($fp);
rename($tmpf, $dest_file);
} else {
return file_get_contents($dest_file);