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

Ad Tag Variables in VAST

We are trying to get ads set up, however our advertising provider will not allow us to process until we can pass the user's IP address and User Agent along with the other supported tags found here:

Is there any workaround that lets us add these variables to the tag, or are we stuck with not being able to use JW Platform for this purpose?

1 Community Answers


JW Player Support Agent  
0 rated :

Ask your ad provider how they expect you to get the user’s IP address. My understanding is that this is not directly available via Javascript.
The user agent is easy to get via Javascript:

var thisUA = navigator.userAgent;
var adTag = ‘’+thisUA+’&cb=random-number‘;
file: ‘bunny.mp4’,
advertising: {
client: ‘vast’,
tag: adTag

If you’re using JW Platform, you will not be able to use the single-line embed. You would need to use the player library URL and add your custom code as documented at

This question has received the maximum number of answers.