需要amp-ad-custom用法说明和示例代码

问题描述

我想与我的特殊客户一起创建自定义广告服务器。我阅读,阅读,阅读... amp.dev网站上的文档不了解-> https://amp.dev/documentation/components/amp-ad-custom/

我的网站https://example.site完全有效, 我的https://ads.site广告位已完全amp4ads有效,

https://example.site/ex-page.html内容

<!DOCTYPE html>
<html ⚡ lang="tr">
<head>... 
BLA BLABLA other contents..
</head>
<body>
<amp-ad-custom width="320" height="250" src="https://ads.site/ex-ads.html"></amp-ad-custom>
</body>
</html>

https://ads.site/ex-ads.html内容

<? header("Access-Control-Allow-Origin: https://example.site");
header("Access-Control-Allow-Credentials: true");
header("AMP-Ad-Template-Extension: amp-mustache");
header("Amp-Ad-Response-Type: template");?>
<!DOCTYPE html>
<html ⚡4ads>
<head>... 
BLA BLABLA other contents..
</head>
<body>
<amp-img src="https://ads.site/image/pizza.png" width="300" height="250" layout="fixed" alt="pizza"></amp-img>
</body>
</html>

我进行的标签关联过程中是否存在错误?可以对所有页面进行amp验证。

在amp-ad-custom文档中提到的广告服务器标题下,我们将在何处使用JSON文本?

广告服务器

广告网络需要提供一个新的服务终端,该终端应返回一个 JSON格式的CORS响应:

{
  templateUrl: "https://adexample.com/amp_template_1.html",data: {
    clickUrl: "https://buy.com/buy-1",buttonText: "Buy Now"
  },analytics: {
    type: "googleanalytics",config: {
      ...
    }
  }
}

我尝试了不同的方法。经过所有尝试后,amp-ad-custom标记的位置为空。在页面不显示任何内容错误控制台中只有1个错误

无效的恢复模式! ................ error.js:208

我在Internet上的任何地方都找不到更多的信息和组件示例。是否可以编写带有示例链接文件内容的示例?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...