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

How to send custom variables / macros to DFP


I can successfully send a request to DFP from JW player and get it to display a video ad from a third party advertiser, however I would like to send some custom variables from JW Player to DFP, which I need DFP to forward to the third party advertiser. DFP says ( that is has a custom macro (%%PATTERN:key%%) that can be used to forward custom variables to the third party advertiser, but my problem is that I don't know how to configure JW Player to send the variable to DFP.

My current code is:

<div id="jwplayerInstance" class="jwplayer"></div>
<script type="text/javascript">// <![CDATA[
if(typeof(jQuery)=="function"){(function($){$.fn.fitVids=function(){}})(jQuery)};jwplayer('jwplayerInstance').setup({"aspectratio":"16:9","width":"100%","skin":"five","primary":"flash","advertising":{"client":"googima","tag":"[referrer_url]&description_url=[description_url]&correlator=[timestamp]&ip_addr=[ua]=Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.94 Safari/537.36"},"ga":{},"sharing":{},"file":"/wp-content/uploads/2014/12/example.mp4"});
// ]]></script>

Everything up until the "ip_addr" parameter in the tag comes from the automatically generated tag provided by DFP. I'm just trying to how to register the variable with DFP via JW Player.


2 Community Answers

Cooper Reid

JW Player Support Agent  
0 rated :

The JW Player supports all DFP add tag variables. You can find the list of variables here:


0 rated :


Thanks for your reply. The URL you have provided makes mention of the following DFP variable, %%PATTERN:key%% (as mentioned in my original post).

My question is if you're able to provide guidance on how I can pass the value/variable from JW Player to DFP.

Kind regards

This question has received the maximum number of answers.