Open zshnr opened 2 years ago
cc @ampproject/wg-monetization @ampproject/wg-ads-reviewers
After further discussions within our engineering team we have made some significant changes to this I2I, essentially changing what we're proposing but for the same purpose.
Looking forward to discussing this in two days time :) also happy to answer any queries before that as well.
I am available on AMP's Slack as well for any questions :)
Thanks!
This was discussed in today's design review. Broadly, we discussed two solutions:
As proposed above, we can either simply increase the timeout for amp-script
or we can have amp-script
send a signal when it's ready and only start the existing 1000ms timeout once amp-script
is ready.
Caveats:
Due to these caveats, we'd need to make these changes behind a document-level opt-in or origin trial, to be able to measure the effects of the changes and ensure that they do not cause ecosystem-wide regressions on the above metrics.
We would need to consider how we might measure the performance and revenue metrics during the implementation phase, as we would need to:
This does also widen the API surface of amp-script
overall, beyond this particular use case. We would need to evaluate what other ways the extended timeout could be used, misused, or abused that might need to be maintained longer-term.
If this content is served in a third-party frame, the Permutive SDK is free to use whatever technologies it likes to implement functionality inside the frame.
Caveats:
Resources:
Solution 1 is the closest to what was originally proposed, but we can not definitively say that this can launch. If we were to prioritize and implement this work (which is not a foregone conclusion), we would still need an extended period of design, implementation, and experimentation, after which (depending on the metrics) we still may not be able to launch.
Solution 2 is supported with infrastructure that AMP has today, so it can be implemented at any time by Permutive. That said, it does come with the potential affects to publisher revenue caused by the third-party iframe.
Thanks again for your time and that of your team @newmuis.
Sorry for the radio silence, I have been on holiday and have just caught up with things after returning.
We are prioritising this work internally and will let you know soon which solution we want to explore.
Thanks!
Hi @newmuis,
I was looking into scoping out work for implementing Permutive as an ad vendor. One question I have is:
If there are multiple <amp-ad type="permutive">
elements on the page loading ads, will each of them have their own iframe context?
If so, it raises a huge problem for us because our library will essentially be loaded individually with each ad whereas it is designed to be loaded once for the whole page.
Am I correct in assuming this will be the case? Is there a mechanism to share any resources between the amp-ad
elements?
Thanks!
Summary
Permutive is an Audience Platform for publishers and advertisers. We have a strong focus on privacy and first-party data: enabling publishers to use their data to power advertising and personalization in real-time, across every device, browser and environment, while respecting user privacy.
One of the essential capabilities we provide publishers is the ability to dynamically target their ads, based on a user's behaviour.
Our previous proposals for amp-script, amp-ad, and amp-analytics have allowed publishers to personalise the user experience on AMP as they would on regular websites.
This proposal builds upon our previous proposal for amp-ad, #33581, which was implemented in this PR #33872, and puts forward a use case for users of RTC config to have more granular control over timeout as well as RTC config having better support for amp-script URIs.
Design Document
Motivation
The Permutive SDK enables publishers to target ads in real-time without having to send data back to our servers for processing.
To facilitate the way our SDK works and is deployed for publishers, we worked with the AMP team to bring a new mode for amp-script called
sandboxed
mode, which was implemented here #33643.This allows our SDK to run client-side on AMP, segmenting users in real-time without their personal data ever leaving their device.
One key feature of the changes we worked on with the AMP team, outlined in the issue mentioned above, was the ability for
amp-ad
components to fetch targeting information from a function exposed by anamp-script
script. For our SDK, this meant that we can take advantage of our real-time segmenting technology to pass on up-to-date segment data toamp-ad
that are all evaluated on the client.However, since trialling this with a few of publishers we have run into performance issues.
As our SDK is served via our CDN, the combination of fetching this, as well as the time it takes to bootstrap a
sandboxed
amp-script
component means thatamp-ad
RTC calls are often made before our SDK is ready to provide information to external services and components.This is especially troublesome on low powered devices and low bandwidth connections, where our SDK is usually too late to pass on targeting information to
amp-ad
Our proposed solution to this is two-fold:
amp-script
URIs should start once the call to the exported function is made.amp-script
component in question is ready and has exported the required function.Alternative Solutions
localStorage.getItem
proxy inamp-script
to become an async function that fetches data from actual LocalStorage. It will have to async because it’ll be crossing thread boundaries in JS (from worker to iframe to the main page and then back)amp-script
can now get whatever is the latest data for a given key from localStorage.getItem
implementationamp-ad
gets direct access to LocalStorage to get data directlyamp-ad
expectsLaunch Tracker
No response
Notifications
/cc @ampproject/wg-performance /cc @ampproject/wg-ads-reviewers