The following example is an ad translator which can be used to serve video ads without the use of an ad server. This example is given as an alternative to using a real ad server or to using ad XML without an ad server.
Note: The steps outlined in this topic are for Flash based players only.
This example is only for video ads; banners and overlays are not supported. Video ads are served by using a video selected from your Video Cloud account, and only one video can be chosen in the key/value pair. Videos that are used as ads will show up within Video Bandwidth in the Video Cloud reports, but the video ads will not show up as a Video Play in the reports.
Here are the basic steps for using the standalone translator:
The key/value pairs mentioned in step 6 above are essential to using the ad translator. Before we go over the key/value pairs that are required for video ads, note that your Video Cloud account must be configured to deliver video content via progressive download (that is, HTTP or PD delivery) or be configured for universal delivery service. If you have an account that delivers content via streaming but does not have universal delivery service enabled, video ads will not play in this example.
You will need to use a key/value pair to provide a video ID so that there is an ad to play. The video ID is specified as follows:
videoID=<The id of the video that you would like to use as an Ad>;
This ID can be found in the media module when the video is selected, as shown below.
If you are providing a video ID, you must also provide the Media API read token, which you can request from customer support. You must also ask customer support to have this token expose the FLV URL.
token=<The Read Token given to you by customer support>;
If you are using the universal delivery service, you must also set a key/value pair for this.
You can also provide a Google Analytics ID for tracking the ads. For example:
googleAnalyticsID=<The Google Analytics account id to send tracking data to>;
The ad translator will send an event before the ad has started and when it completes. Note that the start event is not the same as the IAB standard impression event.
If you are providing a video ID, you can specify a click-through URL:
videoClickURL=<URL for the video ad>;
And if you're having problems, you can add a debug key to see more debug info in flashlog.txt:
All of the key/value pairs mentioned above need to be put together on the same line in whatever location you use to set up your key/value pairs. Here's an example of a standalone translator set up to serve a video ad and use Google Analytics:
The source is provided in the zip file so that you can make your own changes to the ad translator as needed. The example is heavily commented to make it easy for you to do more with it.
In order to compile the ad translator, follow the steps given in the documentation for creating an ad translator. One additional step is needed, which is that a Google Analytics SWC has to be in the library path to compile. Use the analytics.swc from Google.
There are a few limitations with the standalone ad translator. It only serves video, and so it does not have support for banners or overlays. Also, the start event that's sent to Google Analytics is not an IAB standard impression event. The start event may be good enough for your own tracking, however. As noted above, only one video can be chosen in the key/value pair.
If you are willing to compile and make changes to the ad translator yourself, all of the limitations above could be removed. The banners and overlays could be set up by passing in a new key/value pair that gives the URL of a SWF. An IAB standard impression could be added by inserting a startTrackURLs element into the ad XML. More than one video could be chosen by changing the media API call to look at a playlist or to search for a tag.
One limitation that cannot be removed is that the standalone translator is a simple class compared to a real ad server. Ad servers such as Doubleclick and Tremor provide a great deal of functionality, such as day-part targeting, ad campaign frequency capping, etc., that can't be replicated here. Brightcove has many advertising partners that you can talk with about your advertising needs.
If you have problems using the standalone ad translator, have made some reusable changes you'd like to share, or want to suggest something more we can do, head over to the developer forums and let us know about it!