去评论
dz插件网

请问怎么添加优量汇的广告啊?

婷姐
2022/09/20 18:46:27
优量汇的广告添加了,就是各种不显示..

https://developers.adnet.qq.com/doc/web/js_develop

照理说这个代码引入啊什么都有了,只需要放到手机站里指定位置就可以的吧?



<script type="text/javascript">
        // 腾讯广告全局申明只需运行一次
        window.TencentGDT = window.TencentGDT || [];

    // 广告示例声明
        TencentGDT.push({
                app_id: '1200796538',
                placement_id: '4033589908875614', // 广告位id,请从联盟平台广告位获取
                type: 'native', // 广告类型
        display_type: 'banner', // 广告播放类型: banner广告
        carousel: 3000, // 轮播时间,> 3000数字类型,否则轮播会被取消
        containerid: 'banner_2_0', // 广告容器
                onComplete: function(res) {
                if (res.ret == 0) {
                                console.log('广告播放成功');
                } else {
                                console.log('广告播放失败');
                        }
                }
        });
        
        // H5 SDK接入全局只需运行一次
        (function () {
                var doc = document,
                h = doc.getElementsByTagName('head')[0],
                s = doc.createElement('script');
                s.async = true;
                s.src = '//qzs.qq.com/qzone/biz/res/i.js';
                h && h.insertBefore(s, h.firstChild);
        })();
</script>
我知道答案 回答被采纳将会获得5 金币 已有1人回答