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


Hi,

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 (https://support.google.com/dfp_premium/answer/1242718) 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":"http://pubads.g.doubleclick.net/gampad/ads?sz=480x270&iu=/55705491/TND_SpotXChange_DFP_Mobile&ciu_szs&impl=s&gdfp_req=1&env=vp&output=xml_vast2&unviewed_position_start=1&url=[referrer_url]&description_url=[description_url]&correlator=[timestamp]&ip_addr=127.0.0.1&device[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.

Thanks.

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:
https://support.google.com/dfp_premium/answer/1242718?hl=en
-Cooper

digital

User  
0 rated :

Hi,

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.