我有一个包含5个故事页面的AMP故事。 我想根据该标准在自定义故事页面广告位中添加amp4ads广告(例如第6页将包含广告) https://amp.dev/documentation/guides-and-tutorials/develop/story_ads_best_practices/ 我找不到将广告代码嵌入故事中作为故事页面的方法。当然,将代码插入标签内是行不通的。我找不到这方面的任何文档!
我有一个有效的amp故事,但是找不到在故事页面中嵌入HTML广告代码的方法。
...
<amp-story>
...
<amp-story-page>
...
</amp-story-page>
##and here i want to add the ad code
##start injected code
<html amp4ads>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,minimum-scale=1">
<!-- Specifies where the user is directed -->
<meta name="amp-cta-url" content="%%CLICK_URL_UNESC%%%%DEST_URL%%">
<!-- Specifies the call to action button text enum -->
<meta name="amp-cta-type" content="EXPLORE">
<!-- Specifies what type of landing page the user is direct to -->
<meta name="amp-cta-landing-page-type" content="NONAMP">
<style amp4ads-boilerplate>body{visibility:hidden}</style>
<style amp-custom>
amp-img {height: 100vh}
</style>
<script async src="https://cdn.ampproject.org/amp4ads-v0.js"></script>
</head>
<body>
<amp-img src="https://amp.dev/static/img/docs/stampads/sponsored_story_full.png" layout="responsive" height="1280" width="720"></amp-img>
</body>
</html>
##end injected code
<amp-story-page>
...
</amp-story-page>
...
</amp-story>
...