gpt4 book ai didi

html - AMP : not showing adense ads, 但字段为空

转载 作者:行者123 更新时间:2023-12-04 16:15:02 25 4
gpt4 key购买 nike

我在使用 amp-ad 时遇到问题。

<!DOCTYPE html>
<html amp lang="en">
<head>
<meta charset="utf-8">
<script async custom-element="amp-ad" src="https://cdn.ampproject.org/v0/amp-ad-0.1.js"></script>
<script async src="https://cdn.ampproject.org/v0.js"></script>
<meta name="viewport" content="width=device-width,minimum-scale=1">
<link rel="canonical" href="http://localhost:9000/simple-test.html">
<title>AMP Test</title>
<style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style><noscript><style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript>
</head>
<body>
<section id="content">
<div style="width: 728px; height: 90px">
<amp-ad width=728 height=90
type="adsense"
data-ad-client="ca-pub-XXXXXXXXXXXXXXXXX"
data-ad-slot="XXXXXXXXX">
</amp-ad>
</div>
</section>
</body>
</html>

它没有被显示。取而代之的是具有指定尺寸的元素,它插入了一些脚本和 iframe,但里面没有广告。我尝试了所有可用的布局。我还尝试了不同的广告尺寸。根据验证器,代码没问题。

传统的 JavaScript 版本运行良好。
有什么帮助吗?

最佳答案

< link rel="canonical" href="http://localhost:9000/simple-test.html">



Adsense AMP 广告不会在本地开发网站上展示。将此上传到实时站点可能会起作用。还要确保您的域在 adsense 设置中被列入白名单。

关于html - AMP : <amp-ad> not showing adense ads, 但字段为空,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41470698/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com