ampproject / amphtml

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

[Master Feature] Establish an API to let ad trigger specific functionality on the AMP page #17618

Closed jasti closed 4 years ago

jasti commented 6 years ago

There are some use cases when the publisher configuration in the ad must allow the external AMP components to behave differently. Some specific examples are:

  1. Ability to only selectively refresh an ad by looking for the presence of the ad being a sponsorship vs not. (Most publishers don't want to refresh if the ad is a sponsorship based ad but want to refresh otherwise)
  2. Ability to pass additional data from the ad so that the <amp-next-page> component can use it request a certain page dynamically
  3. Ability to append URL params to the destination URL on ad click by simply updating the JS inside of the creative with a new parameter (e.g. ?dfp-keyword=mwb-test)
lannka commented 6 years ago

@jasti I don't quite understand the 2) and 3).

Ability to pass additional data from the ad so that the component can use it request a certain page dynamically

What is the "component" and "page" referring to?

Ability to append URL params to the destination URL on ad click by simply updating the JS inside of the creative with a new parameter (e.g. ?dfp-keyword=mwb-test)

Are you talking about dynamically changing destination URL? Why runtime is involved here?

jasti commented 6 years ago

For 2) Updated the original description. (Sorry). It's the amp-next-page component.

3) Publishers often use this as a technique for sending additional params to destination URLs that are surveys. On non-AMP, their page would probably just use custom JS to reach the param and append to the destination URL.

jasti commented 5 years ago
  1. New Requirement from Post Media: Ability to set '‘data-loading-strategy’' value on a campaign basis based on what's returned within the creative from the ad server.
zhouyx commented 5 years ago

I see the request in two parts:

  1. API: I know we have such API for 3p ad case. I believe there are also existing API for safeframe and FIE case as well.
  2. Communication between AMP components, for example here <amp-ad> and <amp-next-page>.

Has there been a privacy and security discussion?

calebcordry commented 5 years ago

@ampproject/wg-ads Would the new meta tags accomplish the functionality needed here?

lannka commented 4 years ago

De-prioritized.