{"action":"created","issue":{"url":"https://api.github.com/repos/ampproject/amphtml/issues/5721","repository_url":"https://api.github.com/repos/ampproject/amphtml","labels_url":"https://api.github.com/repos/ampproject/amphtml/issues/5721/labels{/name}","comments_url":"https://api.github.com/repos/ampproject/amphtml/issues/5721/comments","events_url":"https://api.github.com/repos/ampproject/amphtml/issues/5721/events","html_url":"https://github.com/ampproject/amphtml/issues/5721","id":184312202,"number":5721,"title":"I2I: Rendering native/simple ads outside amp-ad iframe","user":{"login":"src-code","id":60631,"avatar_url":"https://avatars.githubusercontent.com/u/60631?v=3","gravatar_id":"","url":"https://api.github.com/users/src-code","html_url":"https://github.com/src-code","followers_url":"https://api.github.com/users/src-code/followers","following_url":"https://api.github.com/users/src-code/following{/other_user}","gists_url":"https://api.github.com/users/src-code/gists{/gist_id}","starred_url":"https://api.github.com/users/src-code/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/src-code/subscriptions","organizations_url":"https://api.github.com/users/src-code/orgs","repos_url":"https://api.github.com/users/src-code/repos","events_url":"https://api.github.com/users/src-code/events{/privacy}","received_events_url":"https://api.github.com/users/src-code/received_events","type":"User","site_admin":false},"labels":[{"id":271017269,"url":"https://api.github.com/repos/ampproject/amphtml/labels/INTENT%20TO%20IMPLEMENT","name":"INTENT TO IMPLEMENT","color":"fbca04","default":false}],"state":"open","locked":false,"assignee":{"login":"cramforce","id":89679,"avatar_url":"https://avatars.githubusercontent.com/u/89679?v=3","gravatar_id":"","url":"https://api.github.com/users/cramforce","html_url":"https://github.com/cramforce","followers_url":"https://api.github.com/users/cramforce/followers","following_url":"https://api.github.com/users/cramforce/following{/other_user}","gists_url":"https://api.github.com/users/cramforce/gists{/gist_id}","starred_url":"https://api.github.com/users/cramforce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cramforce/subscriptions","organizations_url":"https://api.github.com/users/cramforce/orgs","repos_url":"https://api.github.com/users/cramforce/repos","events_url":"https://api.github.com/users/cramforce/events{/privacy}","received_events_url":"https://api.github.com/users/cramforce/received_events","type":"User","site_admin":false},"assignees":[{"login":"cramforce","id":89679,"avatar_url":"https://avatars.githubusercontent.com/u/89679?v=3","gravatar_id":"","url":"https://api.github.com/users/cramforce","html_url":"https://github.com/cramforce","followers_url":"https://api.github.com/users/cramforce/followers","following_url":"https://api.github.com/users/cramforce/following{/other_user}","gists_url":"https://api.github.com/users/cramforce/gists{/gist_id}","starred_url":"https://api.github.com/users/cramforce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cramforce/subscriptions","organizations_url":"https://api.github.com/users/cramforce/orgs","repos_url":"https://api.github.com/users/cramforce/repos","events_url":"https://api.github.com/users/cramforce/events{/privacy}","received_events_url":"https://api.github.com/users/cramforce/received_events","type":"User","site_admin":false},{"login":"lannka","id":8496897,"avatar_url":"https://avatars.githubusercontent.com/u/8496897?v=3","gravatar_id":"","url":"https://api.github.com/users/lannka","html_url":"https://github.com/lannka","followers_url":"https://api.github.com/users/lannka/followers","following_url":"https://api.github.com/users/lannka/following{/other_user}","gists_url":"https://api.github.com/users/lannka/gists{/gist_id}","starred_url":"https://api.github.com/users/lannka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lannka/subscriptions","organizations_url":"https://api.github.com/users/lannka/orgs","repos_url":"https://api.github.com/users/lannka/repos","events_url":"https://api.github.com/users/lannka/events{/privacy}","received_events_url":"https://api.github.com/users/lannka/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/ampproject/amphtml/milestones/21","html_url":"https://github.com/ampproject/amphtml/milestones/Community%20Contribution","labels_url":"https://api.github.com/repos/ampproject/amphtml/milestones/21/labels","id":1935848,"number":21,"title":"Community Contribution","description":"","creator":{"login":"ericlindley-g","id":16807766,"avatar_url":"https://avatars.githubusercontent.com/u/16807766?v=3","gravatar_id":"","url":"https://api.github.com/users/ericlindley-g","html_url":"https://github.com/ericlindley-g","followers_url":"https://api.github.com/users/ericlindley-g/followers","following_url":"https://api.github.com/users/ericlindley-g/following{/other_user}","gists_url":"https://api.github.com/users/ericlindley-g/gists{/gist_id}","starred_url":"https://api.github.com/users/ericlindley-g/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ericlindley-g/subscriptions","organizations_url":"https://api.github.com/users/ericlindley-g/orgs","repos_url":"https://api.github.com/users/ericlindley-g/repos","events_url":"https://api.github.com/users/ericlindley-g/events{/privacy}","received_events_url":"https://api.github.com/users/ericlindley-g/received_events","type":"User","site_admin":false},"open_issues":7,"closed_issues":2,"state":"open","created_at":"2016-08-10T23:23:26Z","updated_at":"2016-10-27T00:05:45Z","due_on":null,"closed_at":null},"comments":15,"created_at":"2016-10-20T18:57:25Z","updated_at":"2016-11-11T18:00:18Z","closed_at":null,"body":"Carried over from discussion in PR #5122.\n\nI'd like to implement a small but useful change to `amp-ad` which would allow native advertising rendered without a call to an ad network to still be managed by `amp-ad` with minimal effort.\n## Problem\n\nCurrently `amp-ad` generally assumes that ad content will be rendered from an ad network call, which implies iframes and a network request.  It doesn't gracefully handle the case of native advertising where advertising data may be intermixed with content data in a feed, for instance in a feed of stories rendered on the client by `amp-list` where some stories are sponsored and some are not.  There's currently no graceful way to render such content, contextually taking advantage of the content's styling, while still having the ability to track viewability as `amp-ad` provides. \n\n`amp-ad` already supports `placeholder` and `fallback` ad content which renders outside of the iframe, but these content blocks are ephemeral or must be triggered by API call (or timeout), respectively, and they are not meant to be easily tracked for visibility.\n## Design\n\nSimilar to `fallback` and `placeholder` content, I propose to add a 3rd option called `ad` (or alternatively, `content`).  Content passed in this container will be displayed immediately by `amp-ad` and will negate the use of `fallback` or `placeholder` content.  \n\nUnlike with `fallback` content, `amp-ad` should not immediately destroy the backing iframe, which would be hidden behind the ad content, since visibility tracking would still take place within the plugin code executed within that iframe.  If desired, an API could be introduced to allow the ad plugin to trigger the self-destruction of the iframe once the ad plugin has successfully sent whatever beacons it may choose to send.\n\nThis would give us the best of both worlds, I think - the ability to track very simple AMP-based ad markup without the overhead of A4A or the need for an external ad server providing the content, while still allowing us to track and beacon the visibility of the content with the flexibility offered by the use of Javascript APIs provided by `amp-ad`.  \n## Notes\n\nPR #5541 tracks a somewhat similar desire for non-iframed ad content, but is more restrictive (only allows for a simple image to be rendered) and still requires a network call, and view tracking support is unclear.\n\nIn some ways, this pattern could be thought of as being non-ad specific, I suppose.  It could be used to layer complex tracking behaviors on any arbitrary piece of content, which I imagine would be discouraged.  But if not, I suppose this could be implemented as a new component rather than part of `amp-ad` (something akin to `amp-embed`, for semantics?), sharing a similar plugin model.  \n\ncc @lannka @jasti @dvoytenko\n"},"comment":{"url":"https://api.github.com/repos/ampproject/amphtml/issues/comments/260016693","html_url":"https://github.com/ampproject/amphtml/issues/5721#issuecomment-260016693","issue_url":"https://api.github.com/repos/ampproject/amphtml/issues/5721","id":260016693,"user":{"login":"lannka","id":8496897,"avatar_url":"https://avatars.githubusercontent.com/u/8496897?v=3","gravatar_id":"","url":"https://api.github.com/users/lannka","html_url":"https://github.com/lannka","followers_url":"https://api.github.com/users/lannka/followers","following_url":"https://api.github.com/users/lannka/following{/other_user}","gists_url":"https://api.github.com/users/lannka/gists{/gist_id}","starred_url":"https://api.github.com/users/lannka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lannka/subscriptions","organizations_url":"https://api.github.com/users/lannka/orgs","repos_url":"https://api.github.com/users/lannka/repos","events_url":"https://api.github.com/users/lannka/events{/privacy}","received_events_url":"https://api.github.com/users/lannka/received_events","type":"User","site_admin":false},"created_at":"2016-11-11T18:00:18Z","updated_at":"2016-11-11T18:00:18Z","body":"@src-code I mis-understood your original proposal. As @cramforce has mentioned, if the only thing missing is the visibility tracking, we should just expand amp-analytics to be able to select child element. Using amp-ad's iframe to do visibility tracking is not a good idea. It's costly (using iframe postMessage) and also less reliable. "}}
{"actor":{"display_login":"lannka"}}