问题描述
我已经在DFP广告管理系统中设置了广告单元和键值.我已经根据Google的教程使用以下代码构建了该网站:
I have set up Ad Units and Key Values in DFP. I have built the site with the following code based on Google's tutorials:
<html lang="en">
<head>
<script type="text/javascript">
var googletag = googletag || {};
googletag.cmd = googletag.cmd || [];
(function() {
var gads = document.createElement("script");
gads.async = true;
gads.type = "text/javascript";
var useSSL = "https:" == document.location.protocol;
gads.src = (useSSL ? "https:" : "http:") + "//www.googletagservices.com/tag/js/gpt.js";
var node =document.getElementsByTagName("script")[0];
node.parentNode.insertBefore(gads, node);
})();
</script>
<script>
var sitePath = "/test-kv/parent/page"
googletag.cmd.push(function() {
var kvAdSlot =
googletag.defineSlot('/00000000' + sitePath, [300, 250], 'kvAd');
kvAdSlot.addService(googletag.pubads());
kvAdSlot.setTargeting('key', 'value');
googletag.pubads().collapseEmptyDivs();
googletag.enableServices();
});
</script>
</head>
<body>
<div id='kvAd'>
<script>
googletag.cmd.push(function() { googletag.display('kvAd'); });
</script>
</div>
</body>
</html>
但是,当我测试页面时,我的ROS广告(没有分配键值但定位到所有广告单元)正在显示.我已经搞混了一段时间,无法弄清楚为什么setTargeting似乎无法正常工作,从而将非定向广告排除在键值广告位之外.
However, when I test the page, my ROS ads (which have no key values assigned but target all ad units) are showing up. I have been messing with this for a while and cannot figure out why the setTargeting doesn't seem to be working properly to keep non targeted ads out of the key value ad slot.
推荐答案
返回您的ROS广告完全合乎逻辑.除非您在订单项中明确定义,否则Google DFP广告管理系统将不会排除基于setTargeting的广告.
It's perfectly logical that your ROS ads are returned. Google DFP will not exclude ads based on setTargeting unless specifically defined in your line-item.
在您的订单项中,如果您要指定在键"不等于值"的情况下显示ROS,则不会显示ROS广告.
In your line-item, if you were to specify that the ROS should be shown IF "key" is not equal to "value", then the ROS ads would not be shown.
这篇关于GPT-在关键价值广告位中展示的非关键价值广告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!