Intent to implement: <amp-auto-ads>
I intend to implement an amp extension/tag named amp-auto-ads. This will be a framework for loading a configuration from a 3rd party server that is then used to control the automatic placement of <amp-ad>s within the page.
/to @lannka
@tlong2 would you expand with some more details?
I intend to implement this for use with AdSense, but the implementation will not be tied to anything specific to AdSense and so should be reusable by any other ad networks wanting to do something similar.
The plan is for the new element to extend AMP.BaseElement and initiate loading of a remote JSON configuration in its createdCallback (so the configuration can be loaded as early as possible).
The configuration will define where on the page ads should be placed by identifying an existing element using a query selector and specify whether the ad should be before, after, first child, or last child of it. How this configuration is generated is up to individual ad networks.
The initially inserted
@tlong2 Hi there, following the reference by @lannka (lannka: Thanks for that!), I'm contacting you to understand if amp-auto-ads will help our engine adjust to AMP. If I understand correctly, amp-auto-ads require creating hidden placements in the markup - and according to a remote JSON, will fill these placements with ads when necessary. Am I understanding correctly?
Hi,
The amp-auto-ads approach doesn't require the publisher to have created anything in the markup to specify where ads should go. The remote JSON config provides CSS selectors that identify places on the page where ads can go.
For the AdSense implementation that we're putting into AMP currently, the places that ads can go are decided by an offline process that analyzes the publisher's site to find visually sensible places that don't break the page. But what locations are in the JSON config and how it's created are completely up to the ad network/monetization engine that's serving it.
In some PRs we'll be sending soon will be some small bits of client-side page-analysis that are necessary. E.g. keeping track of where existing ads are so that any newly injected ads aren't too close to them.
Let me know if you need any more details.
@tlong2 Thanks for the detailed reply!
About the offline process you described, is it part of amp-auto-ads? How does the offline process keeps track of AMP pages that contains amp-auto-ads?
I mentioned the AdSense offline system just as an example of how an ad network can create the JSON configs. Any offline systems/analysis are up to the network serving the config and are not part of amp-auto-ads, which is just the client-side AMP extension.
Any pages that have the