AdoTube platform deployment
Embedding your integrated player

This guide is addressed to publishers that want to integrate AdoTube's Platform into their player and want to monetize their videos. Please note that AdoTube is already integrated with Adap.tv, Jamboo Media, and other ad networks, so you might not need to do any modifications to your player. If you're already integrated with an ad network, ask them if they are our partners first. Also, AdoTube already supports the most popular flash video players - Flowplayer & JW FLV Player. You can find the plugins for these players on their website - respectively, here and here. Last, but not least, in the examples below we are using sample placements. Before going live, please contact us to supply you with your valid omlSource - required for the integration.

After integrating your player with our Overstream Platform(OP) or Offer Renderer(OR), you should embed the newly integrated player in your page. There are two way of doing this:

  1. JavaScript embed (recommended)
  2. When using JavaScript embed, you are able to send all the variables needed for the integration to be completed. In order to embed the flash video player we recommend using the SWFObject JS file. This file facilitates the integration of AdoTube Flash Player content into html. You can download the SWFObject file and learn more about how to use it at http://code.google.com/p/swfobject/

    Basic configuration(OP): In order for the player to display ads through AdoTube's Overstream Platform, there is at least one variable needed - the omlSource. The omlSource represents the location of the OML file (an XML type based file used to describe how the placement will behave).
    Here's a minimal sample configuration (please note this is just for testing purposes):

    1. <div id="videoDiv" style="width:450px;height:337px;"></div>
    2. <script type="text/javascript">
    3. var so = new SWFObject("videoPlayer.swf", "videoPlayer", "100%", "100%", "8", "#FFFFFF");
    4. so.addParam("allowFullScreen", "true");
    5. so.addParam("allowNetworking", "all");
    6. so.addParam("wmode", "transparent");
    7. so.addVariable("omlSource", "http://www.adotube.com/docs/adapters/OP/sampleOML.xml");
    8. so.write("videoDiv");
    9. </script>

    Basically, the above example assumes that you don't need to supply any variable for your video player other than the omlSource, which is neccessary for the Overstream Platform. Please note that, in case you haven't hard-coded the overstreamPlatformURL's value is required for the integration to function properly, you will also need to include that variable in the embed:

    1. so.addVariable("overstreamPlatformURL", "http://chibis.adotube.com/overstreamPlatform/OverstreamPlatform.swf");

    Also, if your flash video player is ActionScript 3 based, you will need to include the AS3OverstreamPlatformAdapterURL variable in your configuration:

    1. so.addVariable("AS3OverstreamPlatformAdapterURL", "http://chibis.adotube.com/adapters/AS3OverstreamPlatformAdapter.swf");

    Publisher Dynamic Variables : The Publisher Dynamic Variables (PDV) contain information about the video that can be used to target the videos better and group them accordingly. Usually, these are assembled in a specific format right inside the embed code. Here is an example of the embed code containing PDV (explanation will follow below):

    1. <script type="text/javascript">
    2.     // Javascript Code Snippet to assemble the data into the correct XML format
    3.     function createPVXML(pvars) {
    4.         var pvXML = '<PostVariables>';
    5.         for (var i in pvars) {
    6.             if (pvars[i]) {
    7.                 pvXML += '<PostVariable name="'+i+'" value="'+pvars[i]+'" />';
    8.             }
    9.         }
    10.         pvXML +='</PostVariables>';
    11.         return escape(pvXML);
    12.     }
    13.     adotube_publisher_dynamic_data = {
    14.         video_identifier: "example.com, videoURL, tag1, tag2, tag3, Video title",
    15.         video_tags: "tag1, tag2, tag3",
    16.         video_title: "Video title",
    17.         player_video_stream_url: videoURL
    18.     };
    19.     var _AdoTube_Publisher_Dynamic_Vars = createPVXML(window.adotube_publisher_dynamic_data);
    20. </script>
    21. <div id="videoDiv" style="width:450px;height:337px;"></div>
    22. <script type="text/javascript">
    23.     var so = new SWFObject("videoPlayer.swf", "videoPlayer", "100%", "100%", "8", "#FFFFFF");
    24.     so.addParam("allowFullScreen", "true");
    25.     so.addParam("allowNetworking", "all");
    26.     so.addParam("wmode", "transparent");
    27.     so.addVariable("omlSource", "http://www.adotube.com/docs/adapters/OP/sampleOML.xml");
    28.     so.addVariable("_AdoTube_Publisher_Dynamic_Vars", _AdoTube_Publisher_Dynamic_Vars);
    29.     so.write("videoDiv");
    30. </script>

    In the above example, the createPVXML() method returns an XML containing the PDV or Post Variables (named this way because they are sent by the Overstream Platform to the OML service through POST method, once the OML is requested). These are assembled inside the _AdoTube_Publisher_Dynamic_Vars variable that it's sent as a flashvar to the video player as well.

    Please note that the PDV should be supplied dynamically for each video. For example:

    1. adotube_publisher_dynamic_data = {
    2.     video_identifier: "example.com, http://example.com/sample.flv, interactive, video, games, The new interactive video game is here",
    3.     video_tags: "interactive, video, games",
    4.     video_title: "The new interactive video game is here",
    5.     player_video_stream_url: "http://example.com/sample.flv"
    6. };

    Publisher User Data: The placement can accept pre-populated data about the user through the Publisher User Data (PUD). You should use these variables if the user already has an account on your website. This is important for CPA Offers. You can see here a sample embed code containing PUD:

    1. <script type="text/javascript">
    2.     adotube_publisher_userdata = {
    3.         fn: "John", // First Name (Protected)
    4.         mn: "", // Middle Name
    5.         ln: "Smith", // Last Name (Protected)
    6.         em: "john.smith@test.com", // Email Address (Protected)
    7.         ad1: "", // Address 1 (Protected)
    8.         ad2: "", // Address 2
    9.         ci: "", // City
    10.         st: "", // State: Two character state code, upper case
    11.         po: "90210", // Postal/Zip Code: Five digit zip code
    12.         co: "", // Country: Two character country code, upper case
    13.         g: "M", // Gender M or F
    14.         dob: "01-01-1970", // Date Of Birth MM-DD-YYYY
    15.         hp: "", // Home Phone: Ten digits, no spaces or special characters (Protected)
    16.         bp: "", // Business Phone: Ten digits, no spaces or special characters (Protected)
    17.         wid: "" // Unique Identifier: Unique across all of your users and should stay with the user from visit to visit
    18.     };
    19.     // Javascript Code Snippet to assemble the data into the correct XML format
    20.     function createPVXML(pvars) {
    21.      var pvXML = '<PostVariables>';
    22.      for (var i in pvars) {
    23.          if (pvars[i]) {
    24.              pvXML += '<PostVariable name="'+i+'" value="'+pvars[i]+'" />';
    25.          }
    26.      }
    27.      pvXML +='</PostVariables>';
    28.      return escape(pvXML);
    29.     }
    30.     var _OR_Publisher_Post_Vars = createPVXML(window.adotube_publisher_userdata);
    31. </script>
    32. <div id="videoDiv" style="width:450px;height:337px;"></div>
    33. <script type="text/javascript">
    34.     var so = new SWFObject("videoPlayer.swf", "videoPlayer", "100%", "100%", "8", "#FFFFFF");
    35.     so.addParam("allowFullScreen", "true");
    36.     so.addParam("allowNetworking", "all");
    37.     so.addParam("wmode", "transparent");
    38.     so.addVariable("omlSource", "http://www.adotube.com/docs/adapters/OP/sampleOML.xml");
    39.     so.addVariable("_OR_Publisher_Post_Vars", _OR_Publisher_Post_Vars);
    40.     so.write("videoDiv");
    41. </script>

    Basically, all the properties of the adotube_publisher_userdata object and their corresponding values represent the Publisher User Data. As the Publisher Dynamic Variables, the PUDDD are assembled in the same XML format and passed to the integrated video player.

    Complete Configuration: The complete configuration contains all the variables that could be needed, including the ones presented in the Basic Configuration, above, as well as the Publisher Dynamic Variables and Publisher User Data.

    Demo:



  3. HTML embed
  4. When using the HTML embed, it is more difficult to pass the Publisher Dynamic Vars and Publisher User Data (explained above). That's why we recommend using this scenario only for basic configuration. In case you want to use the PDV and/or PUD while using the HTML embed, please contact support@adotube.com regarding this problem. Here is a sample of the basic configuration using the HTML embed:

    1. <embed
    2. type="application/x-shockwave-flash"
    3. src="videoPlayer.swf"
    4. id="videoPlayer"
    5. name="videoPlayer"
    6. quality="high"
    7. allowfullscreen="true"
    8. allowscriptaccess="always"
    9. flashvars="omlSource=http://www.adotube.com/docs/adapters/OP/sampleOML.xml"
    10. height="390"
    11. width="430" />

    In case you haven't hard-coded a default value for the overstreamPlatformURL and/or AS3OverstreamPlatformAdapterURL (in case you are using ActionScript3), please include them in the flashvars parameter like this:

    1. flashvars="omlSource=http://www.adotube.com/docs/adapters/OP/sampleOML.xml&overstreamPlatformURL=http://chibis.adotube.com/overstreamPlatform/OverstreamPlatform.swf&AS3OverstreamPlatformAdapterURL=http://chibis.adotube.com/adapters/AS3OverstreamPlatformAdapter.swf"

    Please note that you might need to escape the special characters inside those URLs.

    Demo:

Questions? If you have any questions please feel free to Contact Us. Thank you!