Advanced VAST macro passing

In a more complex use case in which you have control of your ad server's (VAST 2.0) XML response, the Vidible Player API allows for a customized object in which you can pass variables through to the parsing of your XML response.  This comes in handy when you are needing to pass in custom URLS or append certain key value pairs that will be dynamically generated in page when the player is created (loaded).

You must have control over the XML response you are getting from the Ad Server.  Vidible does offer a way to create your own VAST tag, in which you can use video media that has been uploaded to the Vidible platform. 

 

1. The first step is to add  script to the existing Vidible Player tag. This can be done with our Edit Add-Ons button or by hand inline on the page you are embedding the player on.

<!--VIDIBLE TAG START-->
<div class="vdb_player ..." >
<script type='text/javascript' src="http://cdn.vidible.tv/..."></script>

<!-- Object Starts Here-->
<script type='text/javascript'>
var JSPlaceholderVariables = {var1: 'http://63mx.com/ck?cb=${CACHEBUSTER}&li=${CPG_ID}&cai=${CP_ID}&pli=${TAG_ID}&cri=${CREATIVE_ID}&oi=${AUCTION_ID}&lp=http%3A%2F%2Fwww.food.com%2F'};
</script>

<!-- Object Ends Here-->
</div>
<!--VIDIBLE TAG END–>

Here you can set up as many variables as you like within the JSON block. The various macros should be in the syntax of the ad server. For example, here we have used AppNexus macro syntax as the values.

2.  Next, you will incorporate the macros into your VAST file. This is done by using the syntax as follow:

|js:yourVar|

Anything that comes before or after this syntax will be pre/appended as you would expect.

As an example, using the variable name from step 1, you can do something such as the following excerpt (referencing just the ClickThrough node in a VAST response):

<ClickThrough>
<![CDATA[ |js:var1|?type=click]]>
</ClickThrough>
 
 
 

This will indicate to grab the value of var1 as defined in the JavaScript, and use it for the ClickThrough URL, appending ?type-click to the end.

As you can see, this gives a very flexible way to pass in any number of variables for different trackers (quartiles, clicks, etc).

Have more questions? Submit a request