A4A Cross Domained AMP Creatives Click URL Does Not Replace X/Y
Short description of your issue:
A4A dynamically replaced CLICK_X/CLICK_Y for any links within its friendly frame upon click for AMP creatives. However, it is possible that AMP creatives can be cross domained if they could not be verified client-side (or failed server-side validation). Need to ensure that CLICK_X/CLICK_Y occurs in this situation.
Original design placed CLICK_X/CLICK_Y replacement on document for all AMP documents but was moved into amp-a4a.js by @cramforce We need it to exist in the cross domained AMP creative case as well (likely as part of amp-inabox effort).
@keithwrightbos so we want to make it available for the whole AMP document?
I saw the CLICK_X/Y are derived from mouseEvent.pageX/Y. For clicks inside an iframe, do you know if it's relative to the iframe doc or the host doc? would there be a discrepancy between xorigin iframe and friendly iframe?
Yes I believe so but only in the case that the document is a creative (e.g. amp-inabox case). CLICK_X/CLICK_Y should be relative to the iframe, not the container page so pageX/Y should be sufficient (please double check). In other words, it the click location within the creative.
Logic should be the same as with the friendly iframe, so we can likely install the very same handler (factored out).
On Tue, Nov 29, 2016 at 12:46 PM, keithwrightbos [email protected] wrote:
Yes I believe so but only in the case that the document is a creative (e.g. amp-inabox case). CLICK_X/CLICK_Y should be relative to the iframe, not the container page so pageX/Y should be sufficient (please double check). In other words, it the click location within the creative.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ampproject/amphtml/issues/6385#issuecomment-263693510, or mute the thread https://github.com/notifications/unsubscribe-auth/AAFeT_nEnI4gQdF_uxnmDBdRZJEiRiAWks5rDI8UgaJpZM4K_bNJ .
Sounds like we agree to install the click handler to whole AMP document? Or is there a privacy or performance concern?
SGTM in the event we know the document is an AMP inabox creative.
On Wed, Dec 28, 2016, 4:04 PM Hongfei Ding [email protected] wrote:
Sounds like we agree to install the click handler to whole AMP document? Or is there a privacy or performance concern?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ampproject/amphtml/issues/6385#issuecomment-269540504, or mute the thread https://github.com/notifications/unsubscribe-auth/ABr0L88U3sJNbwTevLwTeGCpfcKgMoFEks5rMs6pgaJpZM4K_bNJ .
Yes. Very likely I can just move the logic in amp-a4a.js to amp-inabox.js.
Ping @lannka for prioritization.
@jasti let's aim for the coming sprint