Page tree


Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Anchor
top
top
Table of Contents
indent20px
stylenone

OpenWrap simplifies the process of creating video ads by letting you define your ads using parameters added to your ad tag instead of creating a large block of HTML code. The data-flow for video ads in OpenWrap is nearly identical to that of standard ads, but has the addition of a cache server:

Info
Currently, OpenWrap video ad tags work only with DFP AdServer. To learn more about configuring OpenWrap with DFP, see the OpenWrap User Guide.

The process of defining a video ad in OpenWrap is to generate an ad tag as you normally would in DFP, and then append video-specific parameters to the tag. Your result might be similar to this:

OpenWrap Video API

The sections below provide details about the parameters and usage notes for building OpenWrap video ad tags in DFP AdServer.

DFP vs. OpenWrap Query Parameters

You will find that the table below also contains oRTB Video parameters for use in the DFP parameter list. You can send OpenWrap parameters to override the DFP value. For example, if you include only sz=300x250 in the DFP URL, that size populates the W and H parameters in the oRTB Video request. But if you also include pwtsz=<some other size>, then OpenWrap uses the size value from pwtsz.


oRTB Video Request parameterDFP parameterOpenWrap ParameterParameter TypeNotes
API
pwtvapi

BAttr
pwtbatr

BoxingAllowed
pwtbox

Delivery
pwtdvry

Hszpwtvsz
W and H would be provided in pwtvsz or sz in the format: WxH
Linearityvad_typepwtvlin
linear=1,nar=2
MaxBitrate
pwtmxbr

MaxDurationmax_ad_durationpwtvmxd

MaxExtended
pwtmxex

Mimes
pwtmime

List of Integers; for example, pwtmime=1,2

Possible Integer values for pwtmime and their corresponding meaning:

IDValue
0All
1video/mp4
2application/x-shockwave-flash(VPAID - FLASH)
3video/wmv
4video/h264
5video/webm
6application/javascript(VPAID - JS)
7video/ogg
8video/flv


MinBitrate
pwtmnbr

MinDurationmin_ad_durationpwtvmnd

Placement
pwtvplc

PlaybackMethodvpmute, vpapwtplbk
  1. Vpmute=1 & vpa=0, ortb playback=2,6
  2. Vpmute=0 & vpa=1, ortb playback=1,2
  3. Vpmute=1 & vpa=1, ortb playback=2
  4. Vpmute=0 & vpa=0, ortb playback=<none selected>
Pos
pwtvpos

Protocol
pwtprot

Protocols
pwtprots

Sequence
pwtseq

Skip
pwtskp

SkipAfter
pwtskat

SkipMin
pwtskmn

StartDelayvpospwtdly
  • preroll=0
  • midroll=-1
  • postroll=-2
Wszpwtvsz
W and H would be provided in pwtvsz or sz in the format: WxH

Sample request

http://ow.pubmatic.com/openrtb/2.5/video/?v=1&pubId=5890&iuId=Div1&profId=4415&pwtvmxd=100&pwtvmnd=25&pwtmime=1&pwtplbk=1,2&pwtdly=-1&pwtm_description_url=www.abc.com&pwtm_sz=640x480&pwtbatr=1,26&owredirect=https%3A%2F%2Fpubads.g.doubleclick.net%2Fgampad%2Fads%3Fiu%3D%2F15671365%2FVideohbHack%26description_url%3Dhttp%253A%252F%252Ftimesofindia.com%3Fpwtv%3D1%26env%3Dvp%26impl%3Ds%26correlator%3D%26tfcd%3D0%26npa%3D0%26gdfp_req%3D1%26output%3Dvast%26sz%3D300x250%26max_ad_duration%3D%26url%3Dhttp%253A%252F%252Ftimesofindia.com%26unviewed_position_start%3D1%26vpos%3Dpreroll%26vad_type%3Dnar%26vpmute%3D1%26vpa%3D1

Macro Support

You can also send macros for DFP parameters as query parameters to the video endpoint. For example, sending pwtm_description_url=www.test.com would replace the description_url value in the DFP url, then use the same in constructing the oRTB Video object, and also update the DFP redirect URL with these values.

To send a macro for a given DFP parameter, use query parameter key, pwtm_<exact DFP parameter name>. For example,

http://ow.pubmatic.com/openrtb/2.5/video/?v=1&pwtm_description_url=www.abc.com ....

Debug Support

When a request is made to OpenWrap Video endpoint, it responds with a 302 redirect to the DFP URL. But sometimes, you may want to debug a particular request. You may enable debugging for an OpenWrap video request which would return a JSON response containing debug information. However, an important point to note here is: when debugging is enabled, the usual flow of redirection to DFP URL would NOT work and creative would not be rendered.

To enable debugging, you may follow these steps:
1. Use macro to set pwtm_url query parameter in the Video endpoint dynamically.
2. Add logic to always set page URL in pwtm_url macro before making a call to Video endpoint. This way any query parameters added to the page URL would be set in pwtm_url value.
3. When you want to enable debugging, add query parameter pwtvc=1 in the page URL. This would be replaced in the pwtm_url macro with the above logic and Video endpoint would respond with debug response.

Sample Video endpoint call with pwtm_url macro along with macros for a few other DFP parameters like sz, vpos, vtype:

http://ow.pubmatic.com/openrtb/2.5/video/?v=1&pubId=5890&profId=1294&pwtmime=1&owredirect=https://pubads.g.doubleclick.net/gampad/ads?correlator=19812761&iu=/15671365/MG_VideoAdUnit&env=vp&gdfp_req=1&output=vast&sz=640x480&description_url=http%3A%2F%2Fwww.test.com?pwtv=1&tfcd=0&npa=0&vpmute=0&vpa=0&vtype=linear&url=http%3A%2F%2Fwww.test.com&vpos=preroll&unviewed_position_start=1&pwtm_url=%%URL%%&pwtm_sz=%%SIZE%%&pwtm_vtype=%%VTYPE%%&pwtm_vpos=%%VPOS%%

Here is a sample code snippet that replaces pwtm_url macro dynamically with the page URL.

Code Block
< script type = "text/javascript" >

    function makeRequest() {

        var url = document.getElementById("tag").value;
        var size = document.getElementById("size").value;
        var vtype = document.getElementById("vtype").value;
        var vpos = document.getElementById("vpos").value;

        var pageURL = window.location.toString();

        url = url.replace("%%URL%%", pageURL);
        url = url.replace("%%SIZE%%", size);
        url = url.replace("%%VTYPE%%", vtype);
        url = url.replace("%%VPOS%%", vpos);

        var xhttp = new XMLHttpRequest();

        xhttp.onreadystatechange = function() {
            if (this.readyState == 4 && this.status == 200) {
                document.getElementById("op").innerHTML = this.responseText;
            }
        };

        xhttp.open("GET", url, true);
        xhttp.send();
    }

< /script>


Limitations

OpenWrap for Video Ads does not currently support Companion Ads.


⇧ Top