I am trying to set a key-value pair for a post category across all ad positions on the page so we can target that specific category.
Example:
https://www.sporttechie.com/what-to-expect-from-mercedes-benz-stadium-technologically/Category is NFL
The value is being set dynamically in WordPress and I can verify that is happening correctly:
<script type='text/javascript'>
/* <![CDATA[ */
var dfp_vars = {"category":"NFL"};
/* ]]> */
</script>
And the key-value should be fed in with the ad tags on the page:
googletag.cmd.push(function() {
googletag.defineSlot('/105597557/rcol-300x250-lower-ros', [300, 250], 'div-gpt-ad-1493060351984-0').addService(googletag.pubads()).setTargeting("cat", dfp_vars.category);
googletag.pubads().setTargeting("cat", dfp_vars.category);
googletag.pubads().enableSingleRequest();
googletag.pubads().collapseEmptyDivs();
googletag.enableServices();
});
view-source:https://www.sporttechie.com/wp-content/themes/dw-focus/dfp.js?ver=1.0.0
The key-value is setup in DFP but it seems that no impressions are being recorded to category=NFL or any other category. Can anyone lend me some insight here?