mirror of
https://github.com/discourse/discourse-adplugin.git
synced 2025-07-07 22:02:11 +00:00
Temporarily removed custom targeting
This commit is contained in:
parent
2124073de9
commit
ce83cb121c
@ -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();
|
||||
});
|
||||
|
@ -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;
|
Loading…
x
Reference in New Issue
Block a user