From 85d357b00759c992b80850b50d79f2da585b5743 Mon Sep 17 00:00:00 2001 From: Neil Lalonde Date: Wed, 28 Oct 2015 12:20:06 -0400 Subject: [PATCH] DFP: send a 0 value for discourse-category targeting on /latest, /categories, etc so that ads can show there while targeting categories --- assets/javascripts/discourse/components/google-dfp-ad.js.es6 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/javascripts/discourse/components/google-dfp-ad.js.es6 b/assets/javascripts/discourse/components/google-dfp-ad.js.es6 index 1fcf4e1..b8a6f1c 100755 --- a/assets/javascripts/discourse/components/google-dfp-ad.js.es6 +++ b/assets/javascripts/discourse/components/google-dfp-ad.js.es6 @@ -199,7 +199,7 @@ export default Ember.Component.extend({ if (this.get('loadedGoogletag') && this.get('refreshOnChange')) { googletag.cmd.push(function() { - ad.setTargeting('discourse-category', self.get('category') ? self.get('category') : null); + ad.setTargeting('discourse-category', self.get('category') ? self.get('category') : '0'); googletag.pubads().refresh([ad]); }); } @@ -212,7 +212,7 @@ export default Ember.Component.extend({ googletag.cmd.push(function() { var ad = defineSlot(self.get('placement'), self.siteSettings); if (ad) { - ad.setTargeting('discourse-category', self.get('category') ? self.get('category') : null); + ad.setTargeting('discourse-category', self.get('category') ? self.get('category') : '0'); googletag.display(self.get('divId')); googletag.pubads().refresh([ad]); }