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-->
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:
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):
As you can see, this gives a very flexible way to pass in any number of variables for different trackers (quartiles, clicks, etc).