VAST tags are intended to work in a browser context that enables them to get visitor-specific data directly from browser headers.

However, you may need to use VAST tags in non-browser contexts, for example, in OTT, Smart TVs, mobile applications, and server-to-server ad exchanging.

Adserver.Online provides a special type of VAST tags that are ready for server-to-server communication since these tags can get visitor data via special parameters where data is passed explicitly.

Note that another modern way of buying video traffic programmatically is the OpenRTB protocol which supports video ads natively.

How to get S2S/InApp VAST tag

  1. Create a VAST zone and set up a VAST ad. Getting started video should help you.
  2. Ensure that you enable the server tag option in the Publisher/SSP settings for the VAST zone, as S2S functionality won't work without this.
  3. Configure a revenue model for the zone.
  4. Locate the S2S/InApp endpoint on the zone page, which will look something like this:
https://srv.aso1.net/vast?z=XXXXX&ckey=bs6gw&srv=1&ip={ip}&ua={user_agent}&uid={user_id_or_ifa}&page={page_url}&lang={language}&dnt={dnt}

Finally, share the endpoint URL with your supply partner so they can integrate it into their ad system configuration.

Endpoint parameters

    • zidRequired. Zone ID.
    • srvRequired. Must be equal to 1
    • ip – Required. IP address of the visitor.
    • ua – Required. User-Agent header from the visitor's HTTP request. Must be in URL-encoded format.
    • page – Optional. URL of the page where the ad will be displayed. Must be in URL-encoded format.
    • referrer – Optional. URL of the page from where a visitor has come. Must be in URL-encoded format.
    • uid – Recommended. User's unique identifier e.g., IFA or any other.
    • lang – Optional. The language of the visitor. Must be in an Accept-Language header format.
    • refid , refid1– Optional. Reference ID (subid). Up to 50 alphanumeric and special characters are allowed. You will be able to view statistics for each refid, refid1.
    • refid2refid9 – passthrough parameters. Therefore, no stats.
    • dnt – Do Not Track. Integer 0 or 1. By default is 0
    • passback – fallback VAST URL

    Response codes

    • 200 – Successful response
    • 400 – Required parameters are missing
    • 404 – Zone is inactive, or server tag is not enabled

In case of no ads, the system responded with an empty VAST tag.

Request/Response example

Endpoint URL:

https://srv.aso1.net/vast?z=34668&ckey=bs6gw&srv=1&ip=123.123.123.123&ua=Mozilla/5.0%20(Macintosh;%20Intel%20Mac%20OS%20X%2010_15_7)%20AppleWebKit/537.36%20(KHTML,%20like%20Gecko)%20Chrome/117.0.0.0%20Safari/537.36&uid=XXX67876&page=https://example.com&lang=en-US&dnt=1

Response:

<?xml version="1.0" encoding="UTF-8"?>
<VAST version="3.0">
    <Ad id="53514">
        <InLine>
            <AdSystem>ASO</AdSystem>
            <AdTitle>
                <![CDATA[ Title ]]>
            </AdTitle>
            <Impression>
                <![CDATA[ https://trk.aso1.net/wtf.gif?xxxx ]]>
            </Impression>
            <Error>
                <![CDATA[ https://trk.aso1.net/event?err ]]>
            </Error>
            <Pricing model="cpm" currency="USD">
                <![CDATA[ 0.25 ]]>
            </Pricing>
            <Creatives>
                <Creative id="216011" sequence="1">
                    <Linear skipoffset="00:00:05">
                        <Duration>00:00:25</Duration>
                        <TrackingEvents>
                            <Tracking event="start">
                                <![CDATA[ https://trk.aso1.net/event?evt1 ]]>
                            </Tracking>
                            <Tracking event="firstQuartile">
                                <![CDATA[ https://trk.aso1.net/event?evt2 ]]>
                            </Tracking>
                            <Tracking event="midpoint">
                                <![CDATA[ https://trk.aso1.net/event?evt3 ]]>
                            </Tracking>
                            <Tracking event="thirdQuartile">
                                <![CDATA[ https://trk.aso1.net/event?evt4 ]]>
                            </Tracking>
                            <Tracking event="complete">
                                <![CDATA[ https://trk.aso1.net/event?evt5 ]]>
                            </Tracking>
                            <Tracking event="creativeView">
                                <![CDATA[ https://trk.aso1.net/evt6 ]]>
                            </Tracking>
                            <Tracking event="mute">
                                <![CDATA[ https://trk.aso1.net/evt7 ]]>
                            </Tracking>
                            <Tracking event="unmute">
                                <![CDATA[ https://trk.aso1.net/event?evt8 ]]>
                            </Tracking>
                            <Tracking event="pause">
                                <![CDATA[ https://trk.aso1.net/event?evt9 ]]>
                            </Tracking>
                            <Tracking event="resume">
                                <![CDATA[ https://trk.aso1.net/event?evt10 ]]>
                            </Tracking>
                            <Tracking event="fullscreen">
                                <![CDATA[ https://trk.aso1.net/event?evt11 ]]>
                            </Tracking>
                        </TrackingEvents>
                        <VideoClicks>
                            <ClickThrough>
                                <![CDATA[ https://trk.aso1.net/click?xxxx ]]>
                            </ClickThrough>
                        </VideoClicks>
                        <MediaFiles>
                            <MediaFile width="854" height="480" type="video/mp4" delivery="progressive" scalable="true"
                                       maintainAspectRatio="true">
                                <![CDATA[ https://media.aso1.net/storage/d/e/3/video.mp4 ]]>
                            </MediaFile>
                        </MediaFiles>
                    </Linear>
                </Creative>
            </Creatives>
        </InLine>
    </Ad>
</VAST>