Order Now AdSolution Sign Up | Login » Bits on the Run Sign Up | Login »

Forums

/

encodeVars

3 replies [Last post]
Reply

Greetings,

I enabled encodeVars in RC6 with the following config (below). This is for SpotX who is asking for URL encoded links on __page-url__. I cannot tell if it's working from the chrome debug console as in not sure if it's reading the encoding and printing friendly or if it isn't and this var is not supported. Can someone please validate that this var is supported and I've the correct format?

<config>
<ova.title>
  OH HAI
</ova.title>
<ova.json>
{
   "debug": { "levels": "fatal, config, vast_template, vpaid, http_calls, playlist, api, segment_formation, analytics, display_events, region_formation" },
   "ads": {
      "schedule": [
           {
               "position": "pre-roll",
               "tag": "removed",
               "encodeVars": true
           }
      ]
   }
}
</ova.json>
</config>
removed
Reply

Hi,

Thanks for the posting - I was quite surprised when I saw the page-url was not encoded because my immediate reaction was "the config is right", but actually, you've identified a short coming in the "encodeVars" setting that I should fix.

At the moment, you have to declare "encodeVars" as follows for it to work:

{
    ....
    "ads": {
         "schedule": [
              {
                   "position": "pre-roll",
                   "server": {
                         "tag": "your-tag-goes-here",
                         "encodeVars": true
                   }
              }
         ]
    }
}

e.g. as per the following example:

http://static.openvideoads.org/qa/latest/ova.jwplayer.5x/examples/pages/variables/example04.html

That works and you should see the debug output as follows:

removed

Clearly though, having to specify it in "long-form" fashion like that is silly and an oversight so I'll fix it so that you can just use the config that you've declared in the post.

Also, I shouldn't have that ">>> GETTING PAGE URL" debug output still in the code - sorry about that - I'll also clean that up.

Anyway, hope this helps in the short term. Will post once the "encodeVars" is sorted so that you can also specify as you've indicated.

Paul

Reply

Thanks for the rapid response Paul. I've tested and all is working as expected. I look forward to the shorthand updates.

Reply

Hi,

The shorthand option has now been implemented in RC7 Build 18 available on the OVA Developer Site.

You can now specify the "encodeVars" option as follows:

...
      "ads": {
           "schedule": [
                {
                     "position": "pre-roll",
                     "tag": "your-tag-goes-here",
                     "encodeVars": true
                }
           ]
      }
...

Paul

Post new comment

  • Allowed HTML tags: <code> <blockquote> <em> <strong> <strike> <ul> <li> <ol>
  • You may post code using <code>...</code> .
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options