Google AdSense for Video is available only for Brightcove Pro and Enterprise customers. If you are interested in upgrading your Brightcove account, please contact Brightcove for more information.
This document describes how to integrate Brightcove with Google AdSense for Video. It is intended for Brightcove Pro or Enterprise publishers who are using or plan to use Google AdSense for Video (Google AFV). See Brightcove Ad Integrations for a summary of other available ad integration approaches.
Google AFV is an in-video ad product that enables you to monetize your Brightcove-delivered video streams via your Google AdSense account.
Integrating Google AFV with Brightcove involves using a Brightcove "AdSWF" ad format and your own ad server for managing and monitoring ad delivery. By using your own ad server, you maintain control over when and how frequently Google AFV ads are called, enabling you to deliver AdSense all the time, just for remnant inventory, or somewhere in between.
Note that in order to integrate with Google you must have a Google AdSense account that is enabled for AdSense for Video.
Google requires a minimum video display area of 320x240 pixels. Some of the Brightcove player templates do not meet this minimum video window size requirement (for example, the Video Player with Horizontal List template).
Currently, Brightcove supports the "text," "overlay," and "video" Google AFV ad formats. We are working on adding support for the Google AFV end-caps ad format.
The basic workflow for integrating your Brightcove media assets with Google AFV includes these main steps:
In your ad server, create a new custom XML ad.
The format of the XML is as follows:
<adSwf version="1" trackStartURLs="%i">
<adSwfURL>http://admin.brightcove.com/adswf/Google.swf</adSwfURL>
<videoPublisherId>YOUR-GOOGLE-ID</videoPublisherId>
<videoDescriptionUrl>INSERT VIDEO URL</videoDescriptionUrl>
<channels>INSERT CHANNEL(S)</channels>
<adType>overlay</adType>
<adtest>ON IF YOU ARE TESTING</adtest>
<adsafe>INSERT AD FILTERING LEVEL</adsafe>
<maxTotalAdDuration>INSERT VIDEO AD DURATION IN ms</maxTotalAdDuration> (video ads only)
</adSwf>
You can download a sample DFP Google ad template for Brightcove players. If you are unfamiliar with this format, please contact Brightcove Ad Operations support. Fill in the parameters using the table below.
Prior to making an ad request, you will need to set up the appropriate parameters in the XML, including your publisher ID, videoDescriptionUrl, and the type of ad you are requesting.
| parameter name | description |
|---|---|
| videoPublisherId | The publisher's AFV client ID (provided by AdSense). Example: ca-video-pub-00000 |
| videoDescriptionUrl | The full URL of an HTML page that describes the video. Example: http://www.publisher.com/videos/video123.html |
| channels | An array of strings representing AdSense targeting/reporting channel IDs. The channel IDs may only contain numbers, letters, underscores, and hyphens (no spaces or other special characters), and they must match the channel IDs created in your AFV account by your TAM. Up to 5 channels may be passed in per ad request. Example: sports,entertainment |
| adType | The type of ad being requested. The following ad types may be requested: video (pre-/mid-/post-roll video ads), overlay (both text overlays and InVideo graphical overlays), text_overlay (standard text overlays only), and graphical_overlay (standard InVideo graphical overlays only). Example: overlay |
| parameter name | description |
|---|---|
| adtest | Specifies whether this is a test implementation or not. Possible values are "on" or "off". If set to "on," impressions and clicks will not be recorded in your account. This parameter must be used during testing. Defaults to "off". Example: on |
| adsafe | Specifies the setting that should be used to filter ads that display adult or pornographic content. Possible values are "high" (all pornographic and adult ads are filtered) or "medium" (pornographic ads are still filtered, but other adult ads, such as ads for gambling or prescription drugs, are returned). Defaults to "high" if not set. |
| maxTotalAdDuration (Video ad requests only) |
Specifies the maximum video ad length that should be returned. Must be specified in milliseconds. Supported values are "15000" (15 seconds) or "30000" (30 seconds). The default value is "30000". |
Once complete, your final XML for a video ad should look like the following:
<adSwf version="1" trackStartURLs="%i"> <adSwfURL>http://admin.brightcove.com/adswf/Google.swf</adSwfURL> <videoPublisherId>ca-video-pub-00000</videoPublisherId> <videoDescriptionUrl>http://www.publisher.com/videos/video123.html</videoDescriptionUrl> <channels>sports,entertainment</channels> <adType>overlay</adType> <adtest>off</adtest> <adsafe>high</adsafe> <maxTotalAdDuration>15000</maxTotalAdDuration> </adSwf>
To deliver Google AdSense for video ads, your site must allow the Flash player to access data from the Brightcove and Google domains. To do this, add the following domains to your site's crossdomain.xml file:
<allow-access-from domain="*.brightcove.com" /> <allow-access-from domain="*.googlesyndication.com" />
You may have to contact your webmaster in order to make this modification. The crossdomain.xml file is a file that lives on your domain that contains a list of trusted 3rd party domains. If you're unsure how to modify this file as described here, please consult your webmaster.
If you are using the HTML <embed> method to insert the Brightcove player on your page, you must add allowscriptaccess="always" to the code snippet you embed:
<embed src="http://c.brightcove.com/services/viewer/federated_f9/XXXXXX?isVid=1&publisherID=xxx"
allowscriptaccess="always"
bgcolor="#FFFFFF" flashVars="playerID=XXXXXXX&domain=embed&"
base="http://admin.brightcove.com" name="flashObj" width="486" height="412"
seamlesstabbing="false" type="application/x-shockwave-flash"
allowFullScreen="true" swLiveConnect="true"
pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">
</embed>
Google overlay ads are displayed until the next ad call is made or until a new video is loaded into the player. Google video ads play until they are finished or until the user clicks the clickthrough and navigates away from the player.
No, it isn't, but we are looking to support them in the future. We currently support the following Google AFV ad formats: text overlay ads, overlay ads, overlay InVideo ads, and video ads.
Only the Brightcove trackStartURL is fired - all other tracking is done through your Google account.
No, Google does not currently provide an API that allows their video ads to be controlled.
Make sure the publisher ID is correct and verify (through an HTTP traffic monitoring tool, such as Charles) that the Google swf is successfully making an ad call. If the ad call is successful verify that the video window in the player is larger than 320x240. Google ads have a minimum size restriction of 320x240 and Brightcove will not call for or render a Google ad if the video player is below that size.