ampproject / amphtml

The AMP web component framework.
https://amp.dev
Apache License 2.0
14.89k stars 3.89k forks source link

[story-ads] Support analytics triggers when an ad is served into a x-domain iframe. #37832

Open calebcordry opened 2 years ago

calebcordry commented 2 years ago

Description

Story ads are built on top of the AMPHTML Ads format. Usually this means they are rendered into a friendly iframe in web stories. However there are cases where these creatives are rendered into x-domain iframes, and ad networks may decide to start using x-domain at any time.

When an ad is served into a x-domain iframe analytics triggers on the parent page will not fire. We could find a way to postmessage these events from the creative to the parent page using the inabox library. The parent page could listen for the messages and fire the events appropriately.

Potential issues

@ampproject/wg-stories

Alternatives Considered

Don't support this.

Additional Context

https://github.com/ampproject/amphtml/issues/37831

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.