Added working custom targeting to topic list top for one key and one value
This commit is contained in:
parent
50ee40cdfe
commit
67d3504296
|
@ -16,6 +16,7 @@ function splitHeightInt(value) {
|
|||
var str = value.substring(4, 7);
|
||||
return str.trim();
|
||||
}
|
||||
|
||||
|
||||
//PageTracker.current().on('change', function(url) {
|
||||
function loadGoogle(settings) {
|
||||
|
@ -45,7 +46,9 @@ function loadGoogle(settings) {
|
|||
googletag.defineSlot(settings.dfp_topic_list_top_code, [320,50], 'div-gpt-ad-topic-list-top').addService(googletag.pubads());
|
||||
}
|
||||
else {
|
||||
googletag.defineSlot('/' + settings.dfp_publisher_id + '/' + 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());
|
||||
googletag.defineSlot('/' + settings.dfp_publisher_id + '/' + 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')
|
||||
.setTargeting(settings.dfp_target_topic_list_top_key_code, [settings.dfp_target_topic_list_top_value_code])
|
||||
.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) {
|
||||
|
|
|
@ -4,7 +4,8 @@ en:
|
|||
dfp_show_topic_list_top: "Disable topic_list_top ad"
|
||||
dfp_topic_list_top_code: "Show leaderboard ad above topic lists."
|
||||
topic_list_top_ad_sizes: "Choose your ad size"
|
||||
dfp_topic_list_top_custom_targeting_code: "Add your custom targeting code - see instructions"
|
||||
dfp_target_topic_list_top_key_code: "Input key values - Inventory Level"
|
||||
dfp_target_topic_list_top_value_code: "Input key values - Inventory Level"
|
||||
dfp_show_topic_above_post_stream: "Disable topic_above_post_stream ad"
|
||||
dfp_topic_above_post_stream_code: "Show leaderboard ad above post stream"
|
||||
topic_above_post_stream_ad_sizes: "Choose your ad size"
|
||||
|
|
|
@ -112,6 +112,12 @@ ad_plugin:
|
|||
- 180*150 - small rectangle
|
||||
- 200*200 - small square
|
||||
- 250*250 - square
|
||||
dfp_target_topic_list_top_key_code:
|
||||
client: true
|
||||
default: ''
|
||||
dfp_target_topic_list_top_value_code:
|
||||
client: true
|
||||
default: ''
|
||||
dfp_show_topic_list_top:
|
||||
client: true
|
||||
default: false
|
||||
|
|
Loading…
Reference in New Issue