Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Issue with loading spotxchange tag from JW player

I have spotxchange tag which i am trying to load into the JW player.

Following is standard spotxchange tag structure:

I am putting all the value correctly, making VPAID=0 and it's loading the video Adv for me but spotxchange guys telling me to encode the URL(using encodeURIComponent() function) and make VPAID = 1. Here my problem comes, when i do changes as per spotxchange instructions, my video Adv stop loading into the player.

Is there any specific encoding type which i should use to encode URL?
Is VPAID value making issue here?

Please help me to solve this.

A quick help would really appreciated.


3 Community Answers


JW Player Support Agent  
0 rated :

We actually encode URLs when used with our page-url ad tag variable. It’s possible that something is not loading due to the domain this tag is being used on. When checking the tag on our ad tester here:

I am seeing the VAST come through with the SWF creative, but no ad will load. If you manually place an alternate domain for testing, rather than using the page-url, this might potentially work.


0 rated :

following is the actual code for URL:

var randVal = Math.floor((Math.random() * 1000000) + 1);
var loc = encodeURIComponent(document.location.href);
tag: ''+loc+'&cb='+randVal+'&player_width=448&player_height=252'

the only issue with VPAID. If i make VPAID=0 then it is working fine and if i make VPAID=1 then it is not working.

At the moment i have make VPAID=0 and it is working. you can check it at
But spotxchange support telling to make VPAID=1

Please have a look and let me know in case of any further assistance.


JW Player Support Agent  
0 rated :

Is there a reason that you’re utilizing loc and randVal within this ad tag? We do have variables that account for these parameters already. You can use random-number and page-url directly within the ad tag which will encode any utilized URLs.

Additionally, if you’re having a problem loading a VPAID ad, is Flash properly installed on the machine in question? This will only work on computers/devices that have Flash installed and will rule out any mobile devices.

This question has received the maximum number of answers.