VAST Tags

From LoopMe Wiki
Jump to: navigation, search

The LoopMe VAST ad tags allow you to run video ad in your VAST-compliant video player on your website or via a VAST-compliant SDK. Our VAST ad tags supports linear ads with a companion banner.

Our VAST tags support phone and table portrait and landscape ad formats and support the following companion banner sizes:

  • 320x480 Phone Fullscreen Portrait
  • 480x320 Phone Fullscreen Landscape
  • 768x1024 Tablet Fullscreen Portrait
  • 1024x768 Tablet Fullscreen Landscape

Additional companion banner sizes are available upon request.

LoopMe VAST ad tag

Example of LoopMe VAST ad tag:

https://loopme.me/api/vast/ads?appId=e18c19fa43&vast=3&uid=00000000-0000-0000-0000-000000000000&ip=8.8.8.8&bundleid=com.loopme&appname=my_talking_pet&sdk=16.2&exchange=exchange1

Mandatory Parameters

The following parameters should always be included in the VAST ad tag:

  • appId - Unique application or website id provided by LoopMe publisher dashboard
  • vast - VAST response version. Currently LoopMe supports only VAST 2.0 responses.
  • ua - Device user agent of the device making the ad request
  • uid - Unique user identifier. E.g. the device identifier (IDFA for IOS or Google Advertiser ID for Android) or any other unique user identifier (e.g web cookie ID)
  • ip - IP address of the device making the ad request. Wrong IP address can cause country targeting issues, such as "No-Ad responce" for instance.
  • clientid - Name of the client server. Adding this parameter simplifies account debugging on LoopMe side. (e.g. "fyber")
  • dnt - "Do not track" setting for user. Set to "1" to disable tracking.
  • bundleid - App bundle ID on iTunes or Google Playstore. E.g. air.dj.brothersandring.mobile.android.BrothersAndRingGoogle. For web integration it is a domain name registered in LoopMe system. E.g. yoursite.com.
  • appname - Name of the app
  • sdk - Sdk version number used to deliver the ad
  • exchange - Name of the exchange that is used to display the ad. In case you are only supporting direct traffic, please enter the name of your network. E.g. "admarvel"
  • user_consent - Explicit user consent for processing their data, in accordance with applicable data protection legislation, such as General Data Protection Regulation (GDPR). The IAB user consent string is required value.

Optional Parameters

The following parameters can be included in the VAST ad tag to customize ad delivery:

  • campid - ID of the campaign that should be delivered in the VAST ad tag. This parameter is used to fix the campaign to be delivered into the LoopMe ad tag
  • app_version= Version of the app, the ad is displayed in. E.g. "3.2.0"
  • lon - Longitude of the requester. Example: "32.0472364"
  • lat - Latitude of the requester. Example: "-121.435938"
  • reward - Denotes if ad spot is a rewarded ad spot. In case of a rewarded ad spot, please set reward to "1"
  • storeurl - App store URL: https://play.google.com/store/apps/details?id=air.dj.brothersandring.mobile.android.BrothersAndRingGoogle
  • page - website page URl where the video is displaying. Example: "https://www.client.com/news/sports/nba-trickiest-reality"
  • lng - User's handset language. 2 letter ISO language code.
  • compad - Add "&compad=0" if you only want to receive a video mediafile in the VAST XML response.
  • co - Add "&co=1" if you want to receive in the VAST XML response a specific "access-control-allow-origin" that you are sending in Request Header.


VAST Ad Response

Successful Response with Ad

In case ads are available, the VAST ad tag will respond with the following VAST XML document.

  <VAST version="3.0">
      <Ad id="6029">
        <InLine>
          <AdSystem version="2.0.1340">LoopMe LTD</AdSystem>
          <AdTitle>Wiki Ad APIs test</AdTitle>
          <Error>
            <![CDATA[
            https://looptrk.com/sj/tr?et=ERROR&id=59775ffb64ccb260362ccb24&meta=MjcxMDk6NjMxNzoxMjM0&ctx=CgQxMjM0EgJVUxitMSDl0wEqBAgDGAO3&vastcode=[ERRORCODE]
            ]]>
          </Error>
          <Impression>
            <![CDATA[
            https://looptrk.com/sj/tr?et=CUSTOM&name=imp_tracker&id=59775ffb64ccb260362ccb24&meta=MjcxMDk6NjMxNzoxMjM0&ctx=CgQxMjM0EgJVUxitMSDl0wEqBAgDGAO3
            ]]>
          </Impression>
          <Impression>
            <![CDATA[
            https://looptrk.com/sj/tr?et=INBOX_OPEN&id=59775ffb64ccb260362ccb24&meta=MjcxMDk6NjMxNzoxMjM0&ctx=CgQxMjM0EgJVUxitMSDl0wEqBAgDGAO3
            ]]>
          </Impression>
          <Impression>
            <![CDATA[ https://track.loopme.me/sj/vt?vt=1234 ]]>
          </Impression>
          <Creatives>
            <Creative id="27109" sequence="1">
              <Linear skipoffset="00:00:15">
                <Duration>00:00:30</Duration>
                <TrackingEvents>
                  <Tracking event="start">
                    <![CDATA[
                    https://looptrk.com/sj/tr?et=VIDEO_STARTS&id=59775ffb64ccb260362ccb24&meta=MjcxMDk6NjMxNzoxMjM0&ctx=CgQxMjM0EgJVUxitMSDl0wEqBAgDGAO3
                    ]]>
                </Tracking>
                <Tracking event="firstQuartile">
                    <![CDATA[
                    https://looptrk.com/sj/tr?et=VIDEO_25&id=59775ffb64ccb260362ccb24&meta=MjcxMDk6NjMxNzoxMjM0&ctx=CgQxMjM0EgJVUxitMSDl0wEqBAgDGAO3
                    ]]>
                </Tracking>
                <Tracking event="firstQuartile">
                    <![CDATA[
                    https://looptrk.com/sj/tr?et=AD_VIEWABLE&name=25_percent_video&id=59775ffb64ccb260362ccb24&meta=MjcxMDk6NjMxNzoxMjM0&ctx=CgQxMjM0EgJVUxitMSDl0wEqBAgDGAO3
                    ]]>
                </Tracking>
                <Tracking event="midpoint">
                    <![CDATA[
                    https://looptrk.com/sj/tr?et=VIDEO_50&id=59775ffb64ccb260362ccb24&meta=MjcxMDk6NjMxNzoxMjM0&ctx=CgQxMjM0EgJVUxitMSDl0wEqBAgDGAO3
                    ]]>
                </Tracking>
                <Tracking event="thirdQuartile">
                    <![CDATA[
                    https://looptrk.com/sj/tr?et=VIDEO_75&id=59775ffb64ccb260362ccb24&meta=MjcxMDk6NjMxNzoxMjM0&ctx=CgQxMjM0EgJVUxitMSDl0wEqBAgDGAO3
                    ]]>
                </Tracking>
                <Tracking event="complete">
                    <![CDATA[
                    https://looptrk.com/sj/tr?et=VIDEO_COMPLETES&id=59775ffb64ccb260362ccb24&meta=MjcxMDk6NjMxNzoxMjM0&ctx=CgQxMjM0EgJVUxitMSDl0wEqBAgDGAO3
                    ]]>
                </Tracking>
                <Tracking event="mute">
                    <![CDATA[
                    https://looptrk.com/sj/tr?et=VIDEO_MUTE&id=59775ffb64ccb260362ccb24&meta=MjcxMDk6NjMxNzoxMjM0&ctx=CgQxMjM0EgJVUxitMSDl0wEqBAgDGAO3
                    ]]>
                </Tracking>
                <Tracking event="unmute">
                    <![CDATA[
                    https://looptrk.com/sj/tr?et=VIDEO_UNMUTE&id=59775ffb64ccb260362ccb24&meta=MjcxMDk6NjMxNzoxMjM0&ctx=CgQxMjM0EgJVUxitMSDl0wEqBAgDGAO3
                    ]]>
                </Tracking>
                <Tracking event="pause">
                    <![CDATA[
                    https://looptrk.com/sj/tr?et=VIDEO_PAUSE&id=59775ffb64ccb260362ccb24&meta=MjcxMDk6NjMxNzoxMjM0&ctx=CgQxMjM0EgJVUxitMSDl0wEqBAgDGAO3
                    ]]>
                </Tracking>
                <Tracking event="resume">
                    <![CDATA[
                    https://looptrk.com/sj/tr?et=VIDEO_RESUME&id=59775ffb64ccb260362ccb24&meta=MjcxMDk6NjMxNzoxMjM0&ctx=CgQxMjM0EgJVUxitMSDl0wEqBAgDGAO3
                    ]]>
                </Tracking>
                <Tracking event="fullscreen">
                    <![CDATA[
                    https://looptrk.com/sj/tr?et=VIDEO_FULLSCREEN&id=59775ffb64ccb260362ccb24&meta=MjcxMDk6NjMxNzoxMjM0&ctx=CgQxMjM0EgJVUxitMSDl0wEqBAgDGAO3
                    ]]>
                </Tracking>
                <Tracking event="exitFullscreen">
                    <![CDATA[
                    https://looptrk.com/sj/tr?et=VIDEO_EXIT_FULLSCREEN&id=59775ffb64ccb260362ccb24&meta=MjcxMDk6NjMxNzoxMjM0&ctx=CgQxMjM0EgJVUxitMSDl0wEqBAgDGAO3
                    ]]>
                </Tracking>
                <Tracking event="skip">
                    <![CDATA[
                    https://looptrk.com/sj/tr?et=VIDEO_SKIP&id=59775ffb64ccb260362ccb24&meta=MjcxMDk6NjMxNzoxMjM0&ctx=CgQxMjM0EgJVUxitMSDl0wEqBAgDGAO3&playtime=[CONTENTPLAYHEAD]
                    ]]>
                </Tracking>
                <Tracking event="progress" offset="00:00:02">
                    <![CDATA[
                    https://looptrk.com/sj/tr?et=AD_VIEWABLE&id=59775ffb64ccb260362ccb24&meta=MjcxMDk6NjMxNzoxMjM0&ctx=CgQxMjM0EgJVUxitMSDl0wEqBAgDGAO3&name=2_seconds_video
                    ]]>
                </Tracking>
                <Tracking event="progress" offset="00:00:05">
                    <![CDATA[
                    https://looptrk.com/sj/tr?et=VIDEO_5SEC&id=59775ffb64ccb260362ccb24&meta=MjcxMDk6NjMxNzoxMjM0&ctx=CgQxMjM0EgJVUxitMSDl0wEqBAgDGAO3
                    ]]>
                </Tracking>
                <Tracking event="progress" offset="00:00:10">
                    <![CDATA[
                    https://looptrk.com/sj/tr?et=VIDEO_10SEC&id=59775ffb64ccb260362ccb24&meta=MjcxMDk6NjMxNzoxMjM0&ctx=CgQxMjM0EgJVUxitMSDl0wEqBAgDGAO3
                    ]]>
                </Tracking>
                <Tracking event="progress" offset="00:00:15">
                    <![CDATA[
                    https://looptrk.com/sj/tr?et=VIDEO_15SEC&id=59775ffb64ccb260362ccb24&meta=MjcxMDk6NjMxNzoxMjM0&ctx=CgQxMjM0EgJVUxitMSDl0wEqBAgDGAO3
                    ]]>
                </Tracking>
                <Tracking event="close">
                    <![CDATA[
                    https://looptrk.com/sj/tr?et=AD_CLOSE&id=59775ffb64ccb260362ccb24&meta=MjcxMDk6NjMxNzoxMjM0&ctx=CgQxMjM0EgJVUxitMSDl0wEqBAgDGAO3&playtime=[CONTENTPLAYHEAD]
                    ]]>
                </Tracking>
              </TrackingEvents>
              <VideoClicks>
                <ClickThrough>
                  <![CDATA[
                    https://looptrk.com/sj/go/59775ffb64ccb260362ccb24?meta=MjcxMDk6NjMxNzoxMjM0&ctx=CgQxMjM0EgJVUxitMSDl0wEqBAgDGAO3&lmhref=http%3A%2F%2Fadtrack.king.com%2Fmodules%2FadTracking%2FadClicked.jsp%3Ftype%3Dad%26idfa_raw%3D1234%26st1%3Dloopme%26st2%3D33%26st3%3Dus%26st4%3DCCSSoda_gameplay_us_15seconds%26st5%3D%26st6%3D59775ffb64ccb260362ccb24%26st7%3De18c19fa43%26linkId%3D3301
                    ]]>
                </ClickThrough>
                <ClickTracking>
                    <![CDATA[
                    https://looptrk.com/sj/tr?et=VIDEO_CLICK&id=59775ffb64ccb260362ccb24&meta=MjcxMDk6NjMxNzoxMjM0&ctx=CgQxMjM0EgJVUxitMSDl0wEqBAgDGAO3&playtime=[CONTENTPLAYHEAD]
                    ]]>
                </ClickTracking>
                <ClickTracking>
                    <![CDATA[
                    https://looptrk.com/sj/tr?et=CUSTOM&name=postback_click&id=59775ffb64ccb260362ccb24&meta=MjcxMDk6NjMxNzoxMjM0&ctx=CgQxMjM0EgJVUxitMSDl0wEqBAgDGAO3
                    ]]>
                </ClickTracking>
              </VideoClicks>
              <MediaFiles>
                <MediaFile id="27109" delivery="progressive" type="video/mp4" bitrate="249" width="480" height="198">
                  <![CDATA[ https://i.loopme.me/5a2672aa7c9a9152.mp4 ]]>
                </MediaFile>
              </MediaFiles>
            </Linear>
            </Creative>
            <Creative id="27109" sequence="1">
              <CompanionAds>
                <Companion width="768" height="1024">
                  <StaticResource creativeType="image/jpeg">
                    <![CDATA[ https://i.loopme.me/42861a2c988dcfcc.jpg ]]>
                  </StaticResource>
                  <TrackingEvents>
                    <Tracking event="creativeView">
                      <![CDATA[
                      https://looptrk.com/sj/tr?et=COMPANION_SHOW&id=59775ffb64ccb260362ccb24&meta=MjcxMDk6NjMxNzoxMjM0&ctx=CgQxMjM0EgJVUxitMSDl0wEqBAgDGAO3
                      ]]>
                    </Tracking>
                  </TrackingEvents>
                  <CompanionClickThrough>
                    <![CDATA[
                    https://looptrk.com/sj/go/59775ffb64ccb260362ccb24?meta=MjcxMDk6NjMxNzoxMjM0&ctx=CgQxMjM0EgJVUxitMSDl0wEqBAgDGAO3&lmhref=http%3A%2F%2Fadtrack.king.com%2Fmodules%2FadTracking%2FadClicked.jsp%3Ftype%3Dad%26idfa_raw%3D1234%26st1%3Dloopme%26st2%3D33%26st3%3Dus%26st4%3DCCSSoda_gameplay_us_15seconds%26st5%3D%26st6%3D59775ffb64ccb260362ccb24%26st7%3De18c19fa43%26linkId%3D3301
                    ]]>
                  </CompanionClickThrough>
                  <CompanionClickTracking>
                    <![CDATA[
                    https://looptrk.com/sj/tr?et=COMPANION_CLICK&id=59775ffb64ccb260362ccb24&meta=MjcxMDk6NjMxNzoxMjM0&ctx=CgQxMjM0EgJVUxitMSDl0wEqBAgDGAO3
                    ]]>
                  </CompanionClickTracking>
                </Companion>
              </CompanionAds>
            </Creative>
          </Creatives>
        </InLine>
      </Ad>
  </VAST>


No-Ad Response

The no-ad response will be returned, when there are no ads available for the ad tag or there are errors

<VAST xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="vast.xsd" version="2.0">
    <status>NO_AD</status>
</VAST>


Example Use Cases

100% fill VAST ad tag for programmatic campaign

https://loopme.me/api/vast/ads?appId=e18c19fa43&vast=3&campid=6029

Enabling LoopMe VAST ads via your VAST compliant mediation SDK

https://loopme.me/api/vast/ads?appId=e18c19fa43&vast=3&uid=<device id macro>&vast=2&clientid=fyber&exchange=fyber&sdk=1.2.6&dnt=0&bundleid=air.dj.brothersandring.mobile.android.BrothersAndRingGoogle

Where,

  • <device id macro> should be replaced by a unique device ID at the moment of ad serving (for example IDFA for IOS or GAID for Android)


Server side integration of LoopMe VAST ad tags

https://loopme.me/api/vast/ads?appId=e18c19fa43&vast=3&uid=<device id macro>&ip=<ip address of client>&ua=<user agent info>&bundleid=<app bundle macro>&lon=<longitude>&lat=
<latitude>&storeurl=<storeurl>&appname=<name of app>&lng=<handset language>&clientid=yourcompanyname&exchange=<exchange name>&dnt=<dnt value>&sdk=<sdk version>&pchain=<payment ID>&pub_imp=<encoded_impression_url>&co=1&pubid=<pub_id>&user_consent=<user consent>

Where,

  • <device id macro> should be replaced by a unique device ID at the moment of ad serving (for example IDFA for IOS or GAID for Android)
  • <ip address of client> should be replaced by the IP address of the handset making the ad request. Do not use the IP address of your ad server, as this will lead to country targeting problems.
  • <user agent info> should be replaced by the user agent info string of the handset making the ad requests. For example: Mozilla%2f5.0+(iPhone%3b+CPU+iPhone+OS+6_0+like+Mac+OS+X)+AppleWebKit%2f536.26+(KHTML%2c+like+Gecko)+Mobile%2f10A5376e
  • <pub_d> should be replaced by the external ID you use for this publisher to support ads.txt compliancy validation
  • <app bundle macro> should be replaced by a unique app bundle name (for example: com.gtarcade.loa.ph)
  • <longitude> should be replaced by the GPS longitude of the user's handset
  • <latitude> should be replaced by the GPS latitude of the user's handset
  • <storeurl> should be replaced by the store URL of the application (for example: https://play.google.com/store/apps/details?id=com.gtarcade.loa.ph&hl=en)
  • <page> should be replaced by the website page URl where the video is displaying. Example: "https://www.client.com/news/sports/nba-trickiest-reality"
  • <name of app> should be replaced by the name of the application the ad is served in
  • <handset language> should be replaced by the language set on the user's handset
  • <exchange name> should be replaced by the name of the exchanged use to deliver the ad. If you are a direct with publisher, enter the same value as the clientid field
  • <dnt value> should be replaced by the "do not track" preference set by the user
  • <sdk version> should be replaced by the version of the sdk used to server the ad.
  • <payment ID> should be replaced by the TAG payment ID for the inventory offered.
  • <user consent> Explicit user consent for processing their data, in accordance with applicable data protection legislation, such as General Data Protection Regulation (GDPR). The IAB user consent string is required value.
  • <co> optional parameter. Add "&co=1" if you want to receive in the VAST XML response a specific "access-control-allow-origin" that you are sending in Request Header.
  • <encoded_impression_url> should be replaced with your own impression postback URL (URL encoded). Example: %2F%2Feye.vihub.ru%2F%3Fgid%3D0.05257533989328245%26bid%3D2112%26plid%3D519%26s%3D0.08261%26ctx%3DCOX3mMIFEgxhcHBvZGVhbC5jb20Y0dqd9gUiGwoITWFjIE9TIFgSBzEwLjExLjYYBCICKnMoCg%3D%3D%26ref%3Dloopmepub.com%26t%3D1481008661%26oid%3D56%26mid%3DNone%26pid%3D319%26sid%3De581774aeb23cf2fbcde9cd8764758c3



VAST/VPAID Inspector

We recommend using LoopMe VPAID inspector to confirm your LoopMe ad tag returns an advertisement.