简体   繁体   English

Google 广告单元 (DFP) 会在呈现广告时显示编号。 我应该如何隐藏那个号码?

[英]Google ad units (DFP) shows number along with the ad on render. How should I hide that number?

Is there any way to hide that number?有没有办法隐藏这个数字?

Google ad units (DFP) shows number along with the ad on render. Google 广告单元 (DFP) 会在呈现广告时显示编号。 How should I hide that number?我应该如何隐藏那个号码? All the scripts are :所有的脚本是:

googletag.cmd.push(() => {
        googletag.defineSlot(
        this.props.elem.path,
        this.props.elem.size,
    this.props.elem.id,
    ).addService(googletag.pubads());
    googletag.pubads().enableSingleRequest();
    googletag.enableServices();
}

**Body :**
<div id={elem.id} style={{ width: elem.size[0], height: elem.size[1] }}>
    {
       googletag.cmd.push(() => {
           googletag.display(elem.id);
       })
    }
</div>

It was pretty easy just create a new component and add the following code很简单,只需创建一个新组件并添加以下代码

componentDidMount() {
  googletag.cmd.push(() => {
    googletag.defineSlot(
      this.props.elem.path,
      this.props.elem.size,
      this.props.elem.id,
      ).addService(googletag.pubads());
    googletag.pubads().enableSingleRequest();
    googletag.enableServices();
  }
}

render() {
  <div id={elem.id} />
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM