javascriptvast

VAST : How to call a Vpaid Javascript and a Video Ad at the same time?


I am trying to write a VAST XML file that can launch at the same time (approximately) 2 things :

I tried a lot of configurations but unsuccessfully. Here are 3 examples I am currently trying to get working :

<!-- 1 Creative (adparameter Ad Video + mediafile VPAID JS) -->
<VAST version="3.0">
    <Ad id="2016.03.16">
        <InLine>
            <AdSystem>TestVpaid</AdSystem>
            <AdTitle>2016.03.16</AdTitle>
            <Error>
                about:blank
            </Error>
            <Impression>
                about:blank
            </Impression>
            <Creatives>
                <Creative sequence="1">
                    <Linear>
                        <Duration>00:00:30</Duration>
                        <AdParameters>
                            <![CDATA[
                            {"videos":[{"url":"http://cdn.liverail.com/adasset4/1331/229/7969/lo.mp4","mimetype":"video/mp4"}]}
                            ]]>
                        </AdParameters>
                        <MediaFiles>
                            <MediaFile type="application/javascript" apiFramework="VPAID">
                            https://domain_name/test_vpaid.js
                            </MediaFile>
                        </MediaFiles>
                    </Linear>
                </Creative>
            </Creatives>
        </InLine>
    </Ad>
</VAST>

<!-- 1 Creative (staticresource Ad Video + mediafile VPAID JS) -->
<VAST version="3.0">
    <Ad id="2016.03.16">
        <InLine>
            <AdSystem>TestVpaid</AdSystem>
            <AdTitle>2016.03.16</AdTitle>
            <Error>
                about:blank
            </Error>
            <Impression>
                about:blank
            </Impression>
            <Creatives>
                <Creative sequence="1">
                    <Linear>
                        <Duration>00:00:30</Duration>
                        <StaticResource>
                            <![CDATA[
                            {"videos":[{"url":"http://cdn.liverail.com/adasset4/1331/229/7969/lo.mp4","mimetype":"video/mp4"}]}
                            ]]>
                        </StaticResource>
                        <MediaFiles>
                            <MediaFile type="application/javascript" apiFramework="VPAID">
                            https://domain_name/test_vpaid.js
                            </MediaFile>
                        </MediaFiles>
                    </Linear>
                </Creative>
            </Creatives>
        </InLine>
    </Ad>
</VAST>

<!-- 2 Creative (mediafile Ad Video + companionads mediafile VPAID JS) -->
<VAST version="2.0">
    <Ad id="2016.03.16">
        <InLine>
            <AdSystem>TestVpaid</AdSystem>
            <AdTitle>2016.03.16</AdTitle>
            <Error>
                about:blank
            </Error>
            <Impression>
                about:blank
            </Impression>
            <Creatives>
                <Creative sequence="1" >
                    <Linear>
                        <Duration>00:00:30</Duration>
                        <MediaFiles>
                            <MediaFile delivery="progressive" bitrate="400" width="320" height="180" type="video/mp4">
                                http://cdn.liverail.com/adasset4/1331/229/7969/hi.mp4
                            </MediaFile>
                        </MediaFiles>
                    </Linear>
                </Creative>
                <Creative sequence="1" >
                    <CompanionAds>
                        <Companion>
                            <Duration>00:00:30</Duration>
                            <MediaFiles>
                                <MediaFile type="application/javascript" apiFramework="VPAID">
                                    https://domain_name/test_vpaid.js
                                </MediaFile>
                            </MediaFiles>
                        </Companion>
                    </CompanionAds>
                </Creative>
            </Creatives>
        </InLine>
    </Ad>
</VAST>

For my tests I use the google dev page : https://developers.google.com/interactive-media-ads/docs/sdks/html5/vastinspector (thanks to them for putting it online)

Do you know how I could do what I want ?

Thanks in advance, and have a great day


Solution

  • Thanks for your answer, but I found the real problem I was having, I just didn't know I needed to fill the 'videoSlot' required property in the vpaid script.