diff --git a/assets/javascripts/discourse/components/google-dfp-ad.js.es6 b/assets/javascripts/discourse/components/google-dfp-ad.js.es6 index 4ef697d..5a093cc 100755 --- a/assets/javascripts/discourse/components/google-dfp-ad.js.es6 +++ b/assets/javascripts/discourse/components/google-dfp-ad.js.es6 @@ -35,15 +35,14 @@ function loadGoogle(settings) { } // Define our ad units - extend for mobile view. + // Inventory or slot level custom targeting goes here for each of the defined ad units - needs input and injection. + // For each ad slot, if there is set target, then don't put semicolon in after addService, if so, then add it in to close off function. + // Need to add something to the actual site itself... on the page googletag.pubads().setTargeting(‘publisher’, ‘affiliate1′);: googletag.cmd.push(function() { if (settings.dfp_topic_list_top_code && !settings.dfp_show_topic_list_top && settings.topic_list_top_ad_sizes) { const_width = parseInt(splitWidthInt(settings.topic_list_top_ad_sizes)); const_height = parseInt(splitHeightInt(settings.topic_list_top_ad_sizes)); - googletag.defineSlot(settings.dfp_topic_list_top_code, [parseInt(splitWidthInt(settings.topic_list_top_ad_sizes)), parseInt(splitHeightInt(settings.topic_list_top_ad_sizes))], 'div-gpt-ad-topic-list-top'). - - // Inventory level custom targeting goes here for each of the defined ad units. - setTargeting('location', ['melbourne']). - addService(googletag.pubads()); + googletag.defineSlot(settings.dfp_topic_list_top_code, [parseInt(splitWidthInt(settings.topic_list_top_ad_sizes)), parseInt(splitHeightInt(settings.topic_list_top_ad_sizes))], 'div-gpt-ad-topic-list-top').addService(googletag.pubads()); } if (settings.dfp_topic_above_post_stream_code && !settings.dfp_show_topic_above_post_stream && settings.topic_above_post_stream_ad_sizes) { const_width = parseInt(splitWidthInt(settings.topic_above_post_stream_ad_sizes)); @@ -53,17 +52,18 @@ function loadGoogle(settings) { if (settings.dfp_topic_above_suggested_code && !settings.dfp_show_topic_above_suggested && settings.topic_above_suggested_ad_sizes) { const_width = parseInt(splitWidthInt(settings.topic_above_suggested_ad_sizes)); const_height = parseInt(splitHeightInt(settings.topic_above_suggested_ad_sizes)); - googletag.defineSlot(settings.dfp_topic_above_suggested_code, [parseInt(splitWidthInt(settings.topic_above_suggested_ad_sizes)), parseInt(splitHeightInt(settings.topic_above_suggested_ad_sizes))], 'div-gpt-ad-topic-above-suggested').addService(googletag.pubads()); + googletag.defineSlot(settings.dfp_topic_above_suggested_code, [parseInt(splitWidthInt(settings.topic_above_suggested_ad_sizes)), parseInt(splitHeightInt(settings.topic_above_suggested_ad_sizes))], 'div-gpt-ad-topic-above-suggested') + .addService(googletag.pubads()); } if (settings.dfp_post_bottom_code && !settings.dfp_show_post_bottom && settings.post_bottom_ad_sizes) { const_width = parseInt(splitWidthInt(settings.post_bottom_ad_sizes)); const_height = parseInt(splitHeightInt(settings.post_bottom_ad_sizes)); - googletag.defineSlot(settings.dfp_post_bottom_code, [parseInt(splitWidthInt(settings.post_bottom_ad_sizes)), parseInt(splitHeightInt(settings.post_bottom_ad_sizes))], 'div-gpt-ad-post-bottom').addService(googletag.pubads()); + googletag.defineSlot(settings.dfp_post_bottom_code, [parseInt(splitWidthInt(settings.post_bottom_ad_sizes)), parseInt(splitHeightInt(settings.post_bottom_ad_sizes))], 'div-gpt-ad-post-bottom') + .addService(googletag.pubads()); } - // Page Level custom targeting goes here. - googletag.pubads().setTargeting('gender', ['male']); - + // Page Level custom targeting goes here - needs an input section and also ad tags on the relevant pages + // googletag.pubads().setTargeting("gender","female"); googletag.pubads().enableSingleRequest(); googletag.enableServices(); }); diff --git a/auto_generated/plugin_35b7129bb0cbeb4d26e08da97f26fb7cc56cd329.css b/auto_generated/plugin_5e03562e98e357709eaba07c3a0e9054afdd7697.css similarity index 65% rename from auto_generated/plugin_35b7129bb0cbeb4d26e08da97f26fb7cc56cd329.css rename to auto_generated/plugin_5e03562e98e357709eaba07c3a0e9054afdd7697.css index 9b1f860..677144a 100644 --- a/auto_generated/plugin_35b7129bb0cbeb4d26e08da97f26fb7cc56cd329.css +++ b/auto_generated/plugin_5e03562e98e357709eaba07c3a0e9054afdd7697.css @@ -1,20 +1,20 @@ -.discourse-google-dfp { +.google-dfp-ad { padding: 3px; margin-bottom: 10px; clear: both; } -.discourse-google-dfp .dfp-ad-unit { +.google-dfp-ad .dfp-ad-unit { margin: 0 auto; } -.discourse-google-dfp .google-dfp-ad-label { +.google-dfp-ad .google-dfp-ad-label { width: 728px; margin: 0 auto; } -.discourse-google-dfp .google-dfp-ad-label h2 { +.google-dfp-ad .google-dfp-ad-label h2 { margin: 4px 0 !important; color: #858a8c; text-transform: uppercase;