Video SEO Software Developer Kit Version 1.4

The Video SEO Software Developer Kit allows a publisher to increase the visibility of their video content to search engines. The Developer Kit leverages Ooyala's extensive APIs to add descriptive metadata to webpages in which Ooyala video content is embedded. This metadata increases the relevance of the content to search engines.

How Web Crawlers Work

Search engines employ web crawlers to index content on the web. Web crawlers periodically visit and index websites. The ranking and indexing of content on webpages is based on information contained both in the <head> <meta name="SKYPE_TOOLBAR" content="SKYPE_TOOLBAR_PARSER_COMPATIBLE" /> and <body> elements of the page. Typically, crawlers do not execute any of the Javascript or Flash code contained on the pages they are indexing, which means crawlers are not able to effectively index the dynamic video content which is loaded in our Flash player. In order to load the Ooyala player a browser must either execute Javascript or directly load a Flash object. This presents a challenge for publishers who want to ensure their content is indexed by search engines.

Video SEO Software Developer Kit

The Video SEO Software Developer Kit is composed of two primary methods which will help overcome the challenge of generating indexable content for search engines. The first method generates an HTML header for the page which contains descriptive information about the video or channel. The second method generates a body element which contains additional metadata describing the embedded content. The body element uses Javascript to dynamically swap a player with the metadata describing the video. This results in a web crawler, which does not execute Javascript, to index the metadata, while a browser, which executes the Javascript, will have a normal playback experience.

The following metadata is used by the Video SEO Software Developer Kit:

The code to generate SEO compliant embeds is provided in the form of server-side scripts which should be executed when a particular webpage is loaded.

The Video SEO Software Developer Kit makes use of Backlot APIs as well as the Custom Metadata feature and is only available for Professional and Enterprise accounts.

Code

The Developer Kit is available in PHP, Ruby, Python, and Java.

PHP

Download the Video SEO Software Developer Kit for PHP

Example:


<?php
# Video SEO Developer Kit Version 1.4
# Feb 10, 2010, Ooyala
#
# Example illustrating how to use the Video SEO Developers Kit.

# include the Video SEO Developer Kit class
include("ooyala_video_seo_developer_kit.php");

# You can find your Partner and Secret codes under the Developers
# area of the Backlot Account tab. Embed codes are under the Embed area
# of the Backlot Manage tab.
$video = new OoyalaSEOFriendlyVideo(partner_code, secret_code, embed_code);

echo "<html>\n";
echo "<head>
<meta name="SKYPE_TOOLBAR" content="SKYPE_TOOLBAR_PARSER_COMPATIBLE" /> \n";
echo $video->header();
echo "\n</head>\n";

echo "<body>\n";
echo $video->body(640, 480);
echo "\n<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-1856075-1']);
  _gaq.push(['_setDomainName', '.ooyala.com']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>

<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-1856075-1");
pageTracker._setDomainName(".ooyala.com");
pageTracker._trackPageview();
} catch(err) {}
</script>

<script src="http://munchkin.marketo.net/munchkin.js"
type="text/javascript"></script>
<script>mktoMunchkin("447-EQK-225");</script>

<link rel="shortcut icon" HREF="/i/favicon.ico">

<!-- Start of HubSpot Logging Code  -->
<script type="text/javascript" language="javascript">
var hs_portalid=94834; 
var hs_salog_version = "2.00";
var hs_ppa = "ooyala.app9.hubspot.com";
document.write(unescape("%3Cscript src='" + document.location.protocol + "//" + hs_ppa + "/salog.js.aspx' type='text/javascript'%3E%3C/script%3E"));
</script>
<!-- End of HubSpot Logging Code -->
</body>\n";
echo "</html>\n";

?>

Ruby

Download the Video SEO Software Developer Kit for Ruby

Example:


# Video SEO Developer Kit Version 1.4
# Feb 10, 2010, Ooyala
#
# Example illustrating how to use the Video SEO Developers Kit.

# include the Video SEO Developer Kit class
load "ooyala_video_seo_developer_kit.rb";

# You can find your Partner and Secret codes under the Developers
# area of the Backlot Account tab. Embed codes are under the Embed area
# of the Backlot Manage tab.
video = Ooyala::SEOFriendlyVideo.new(partner_code, secret_code, embed_code)

puts "<html>\n"
puts "<head>
<meta name="SKYPE_TOOLBAR" content="SKYPE_TOOLBAR_PARSER_COMPATIBLE" /> \n"
puts video.header()
puts "\n</head>\n"

puts "<body>\n"
puts video.body(640, 480)
puts "\n<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-1856075-1']);
  _gaq.push(['_setDomainName', '.ooyala.com']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>

<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-1856075-1");
pageTracker._setDomainName(".ooyala.com");
pageTracker._trackPageview();
} catch(err) {}
</script>

<script src="http://munchkin.marketo.net/munchkin.js"
type="text/javascript"></script>
<script>mktoMunchkin("447-EQK-225");</script>

<link rel="shortcut icon" HREF="/i/favicon.ico">

<!-- Start of HubSpot Logging Code  -->
<script type="text/javascript" language="javascript">
var hs_portalid=94834; 
var hs_salog_version = "2.00";
var hs_ppa = "ooyala.app9.hubspot.com";
document.write(unescape("%3Cscript src='" + document.location.protocol + "//" + hs_ppa + "/salog.js.aspx' type='text/javascript'%3E%3C/script%3E"));
</script>
<!-- End of HubSpot Logging Code -->
</body>\n"
puts "</html>\n"

Python

Download the Video SEO Software Developer Kit for Python

Example:


# Video SEO Developer Kit Version 1.4
# Feb 10, 2010, Ooyala
#
# Example illustrating how to use the Video SEO Developers Kit.

# include the Video SEO Developer Kit class
from ooyala_video_seo_developer_kit import *

# You can find your Partner and Secret codes under the Developers
# area of the Backlot Account tab. Embed codes are under the Embed area
# of the Backlot Manage tab.
video = OoyalaSEOFriendlyVideo(partner_code, secret_code, embed_code)

print "<html>";
print "<head>
<meta name="SKYPE_TOOLBAR" content="SKYPE_TOOLBAR_PARSER_COMPATIBLE" /> ";
print video.header()
print "</head>\n";

print "<body>";
print video.body(640, 480)
print "<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-1856075-1']);
  _gaq.push(['_setDomainName', '.ooyala.com']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>

<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-1856075-1");
pageTracker._setDomainName(".ooyala.com");
pageTracker._trackPageview();
} catch(err) {}
</script>

<script src="http://munchkin.marketo.net/munchkin.js"
type="text/javascript"></script>
<script>mktoMunchkin("447-EQK-225");</script>

<link rel="shortcut icon" HREF="/i/favicon.ico">

<!-- Start of HubSpot Logging Code  -->
<script type="text/javascript" language="javascript">
var hs_portalid=94834; 
var hs_salog_version = "2.00";
var hs_ppa = "ooyala.app9.hubspot.com";
document.write(unescape("%3Cscript src='" + document.location.protocol + "//" + hs_ppa + "/salog.js.aspx' type='text/javascript'%3E%3C/script%3E"));
</script>
<!-- End of HubSpot Logging Code -->
</body>";
print "</html>\n";

Java

Download the Video SEO Software Developer Kit for Java

Example:


<%
// Video SEO Developer Kit Version 1.4
// Feb 10, 2010, Ooyala
//
// Example illustrating how to use the Video SEO Developers Kit.
 %>
 
<%
// include the Video SEO Developer Kit class
%>
<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>
<%@ page import="ooyala.OoyalaSEOFriendlyVideo"%>
<%
	// You can find your Partner and Secret codes under the Developers
	// area of the Backlot Account tab. Embed codes are under the Embed area
	// of the Backlot Manage tab.

	OoyalaSEOFriendlyVideo video = new OoyalaSEOFriendlyVideo(partner_code, secret_code, embed_code);
%>
<html>
<head>
<meta name="SKYPE_TOOLBAR" content="SKYPE_TOOLBAR_PARSER_COMPATIBLE" /> 
<%=
	video.header()
%>
</head>

<body>
<%=
	video.body(640, 480)
%>
<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-1856075-1']);
  _gaq.push(['_setDomainName', '.ooyala.com']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>

<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-1856075-1");
pageTracker._setDomainName(".ooyala.com");
pageTracker._trackPageview();
} catch(err) {}
</script>

<script src="http://munchkin.marketo.net/munchkin.js"
type="text/javascript"></script>
<script>mktoMunchkin("447-EQK-225");</script>

<link rel="shortcut icon" HREF="/i/favicon.ico">

<!-- Start of HubSpot Logging Code  -->
<script type="text/javascript" language="javascript">
var hs_portalid=94834; 
var hs_salog_version = "2.00";
var hs_ppa = "ooyala.app9.hubspot.com";
document.write(unescape("%3Cscript src='" + document.location.protocol + "//" + hs_ppa + "/salog.js.aspx' type='text/javascript'%3E%3C/script%3E"));
</script>
<!-- End of HubSpot Logging Code -->
</body>
</html>