-
Notifications
You must be signed in to change notification settings - Fork 753
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Passing userIds to Prebid Server using AMP #1404
Comments
I'd rather not store the eids in the PBS cookie. 1) that cookie can already get big. 2) more privacy headaches How about we just define a new macro USER_IDS in the RTC vendors:
Then the publisher would be responsible for passing the eids array in:
We could come up with a short-hand for this JSON, but would rather not PBS have to understand it, and there are exceptions to the general rule of source+id. e.g. TDID has an ext, as will SharedId. |
@bretg I like that approach better! I wasn't sure how much flexibility we have on the vendor macros, but this is more approachable and simpler from my perspective. |
Discussed and accepted by Prebid Server Committee. We'll just need to work out the JSON format. To keep things simple, does Base64 encoded JSON work for you? PBS would decode the Base64 was representation and parse it as eids. If there are no parse errors, it will be set as-is in the request. If there is a parse error, should this be an error or a warning? |
@SyntaxNode From my perspective, that would work well. I would suggest throwing an error unless there is precedent (other macro validation?) to do things differently. In most cases, I'd expect PBS would expect a valid user ID string. |
We need to settle on the eid format to begin implementing. Is a base64 encoded json blob alright? Do we want to go with escaped json as you originally included? Did you @bretg want to suggest a short hand encoding? |
Base64 JSON blob works for me. To illustrate, something like:
|
Would this approach work with cached pages? It seems a customized page has to generated per user, but cache on google and bing serve the same copy. |
@pycnvr Good question. Could you use something like https://amp.dev/documentation/components/amp-access/ to get user-specific data without invalidating the cache? |
@ian-lr Possibly. Not sure how to link dynamic values to rtc-config, though. The list of available macros is controlled by doubleclick rtc. |
@pycnvr OK, let me see if I can experiment a bit with this and see if I can get the cache working, too. |
Sounds good. We'll hold off implementing for now. |
We don't need to use macros. We can evolve the First Party Data feature to support eids similar to the way proposed for the Publisher-Provided User ID feature in prebid/Prebid.js#5690 [deleted obsolete straw example. see below for the most recent proposal] |
@bretg As far as I can tell, AMP is not making this easy. When a user does a google search, and click on one of the AMP links, it's actually a page cached by google. So the publisher doesn't even have a chance to fill in the first party data. The properties in amp-ad are static, except for those that can be supplied via macros. For example, the following are the same page but served from different domains.
|
@pycnvr - can arbitrary javascript run on an AMP page? Does it have DOM access to tags? If so, could that javascript scan the tags and add/update data like either the 'rtc-config' or the 'json'? We haven't finalized how we're going to pass |
Nevermind. I found the reference that |
@bretg I found this AMP Issue tagged with |
That's interesting @ian-lr , though I'm not sure how helpful it will be if it's tied to Permutive. No one seems to have pushed back on a vendor-specific tag. |
@bretg non-Permutive specific implementation: LMK if we can help test a PBS execution on our domains once the above is built |
@bretg @adamleslie Is this spec complete / ready to implement? |
AMP 30193 is still in the proposal stage. Could take a while for them to implement. My understanding is that it would allow dynamic 'json' targeting to be applied to amp-ad RTC. (corrections welcome) In the meantime, we can discuss how to pass that data through to Prebid Server. If it's on the json field, I'd propose we come up with a way to pass an Here's a straw:
Prebid Server would look in the targeting field for "eids", validate it, and inject into user.ext.eids. Assuming an EIDs permissioning scheme is approved, it would also handle that. |
@bretg Returning back to this, do you think that we should hold off until the eid permissioning is locked in before proceeding with the suggested straw here? |
AMP has a feature now that allows RTC to call a script. But I'll have to admit I'm not connecting the dots for how to integrate the two pieces. Here's the example on the AMP page
From this example it's not clear that we can use the standard vendors in rtc-config. (?) But this example seems like a high level "idea" because the I'm not particularly fond of a making pubs hardcode the PBS URLs in their pages because we change the vendor config sometimes. e.g. we recently added AMP consent fields. Maybe one of the Prebid AMP experts can weigh in on the possibilities here? |
I'm currently experimenting with this feature (though I'm not an AMP expert).
The script RTC callouts don't return a url. They return JSON containing the key/values. So for doubleclick's AMP-AD, we want to return the same structure as your example (he same as prebid-server's RTC response). Not sure if you can configure a vendor in rtc-config to be a script RTC (in AMP's callout-vendors.js). However, you can use an external script to reduce publisher maintenance: As far as I know, you can't use the MACROS with scripts. Instead, the script will get dynamic values from amp-analytics.
And in your script:
The Not sure about consent unfortunately.. but you can get other bits of info. Documented here. Not sure how to get the EIDS. The script runs in webworker (and inside another iframe) so it has no access to local storage. So might only be limited to TP cookie. Also RTC callouts happen at the same time. Not processed/merged sequentially. So prebid-server RTC callout can't get results from another callout. Or you guys thinking about changing PBS callout to script callout? Hope this info helps a bit. |
Thanks @philipwatson , but I'm not following.
We don't care what the AMP syntax is. Publishers that want to pass dynamic data (like user IDs) can use a different syntax if needed. The original use case can stay with the currently documented 'vendors' approach. We'll document whatever other scenarios are necessary.
In order to be useful for Prebid Server, the requirement is straightforward: some kind of AMP setup that gathers the desired dynamic data and passes it through to the Prebid Server /amp endpoint.
What is this -- is it You also say "The script RTC callouts don't return a url.", but why then is |
Discussed in committee today. It does seem possible to thread the need here, but that may not be the most valuable thing to do here. Assuming that a url protocol of
The only things we'd need to do are:
FWIW, I couldn't get this approach to work, but didn't spend much time with it. If someone has an example they could post here, that would be great. Alternate approachBut in the meeting, an alternate approach was proposed: use a new host company cookie to store the eids block.
Any thoughts about either of these approaches? |
Hi @bretg Not sure if readers are aware, but Might have time to create an example later today or tomorrow. |
@philipwatson I think an example would be great, when your time allows. Thank you. |
Hi @bretg, I thought I would wade in here if that is ok - I proposed the alternative suggestion mentioned in your comment of 25th June. The current proposal seems very complex to me given there is already an ID management solution in place for third party IDs, so I still think that we should start here and extend the current solution before introducing a whole new paradigm. An additional potential benefit of using the same mechanism is that we might be able to enhance the effectiveness of the third party ID sync using 1st party IDs - e.g. if we don't have any third party IDs in a cookie, but we do have a first party ID that has previously had third party IDs attached, we can pre-populate the third party IDs. I see two potential ways of this working, not mutually exclusive (i.e. we could support both):
The result of either method would be an additional user id cookie on the prebid server domain which would be used by the server to populate the appropriate part of the openrtb schema. The obvious argument against this approach is that the usersync process is asynchronous and that it is likely not to have occurred before the first bid request is made in a cold start situation. So we would end up with a fair proportion of bids without the publisher provided ids, which is the current issue we have with third party IDs. My counter argument to this is the AMP philosophy is that the source is cacheable and processes should not be blocked on one another - so we are in a situation where we have to make another call to the publisher to get the IDs and this really shouldn't be blocking, which means we end up in an async situation anyhow. If we can solve this for publisher provided IDs, we should also apply it to third party IDs if we can. So, in summary, to move forward, I suggest we extend the existing mechanism - give it a go, see what feedback we get, and improve from there, for all types of IDs. |
@OllyTriple13 - this is a good idea to explore. Publisher-specified IDs are different than 3rd party IDs in where they appear in the openrtb:
In order for PBS to know to treat them differently, the values would need to either be stored in a different PBS cookie or in a special block within the existing uids cookie. I like the latter because adding cookies is a hassle -- host companies need to document which cookies they set and why. Where to store these new thingsSo here's a proposal for where to store eids in the existing 'uids' cookie:
Setting the eid valuesTo get values into this new field, we need to either expand the /setuid endpoint or create a new /seteid endpoint. (A) Expand /setuid We could expand this with a new mode on the existing endpoint:
(B) Create a new /seteid endpoint If it's too hacky to shoehorn eids into /setuid, a new endpoint could be created
Writing user.ext.eidsThe main auction process would be enhanced to read the new
Note that the same Invoking /setuid or /seteidWhichever endpoint, the next question is how does it get invoked? A couple of options (A) Let the publisher come up with their own amp-iframe. It could solve the problem however they want -- hit an existing pub endpoint and parse it however they want -- all it has to do is drop a pixel to /setuid or /seteid. (B) Expand load-cookie.html with a new argument to hit a defined endpoint This endpoint would respond in some new format. e.g.
Then load-cookie.html would parse the results and create the pixels for /seteid |
We discussed this internally and agreed that it makes sense to consider this together with #1985 - the effort to shrink the PBS cookie with protobuf. |
@bretg apologies for the delay in response on this. I support this approach and it would be great to get it included in the new protobuf spec. |
Update: the other 2 cookie-sync improvements (#2173 and #1986) have been deemed higher priority and big enough chunks to chew on. The Magnite team has these prioritized higher than either the protobuf (#1985) or this enhancement. Given the magnitude of this EIDs change with other cookie-related changes in progress, if there's another team considering doing this, I'd recommend close coordination via the PBS committee. And given the issues we're having with the "full cookie" scenario, I propose expanding the
The cookie-sync code will need to figure out what can get kicked out of the cookie in the increasingly common 'full' scenario. |
PBS-Java has released the cookie-sync refactoring. Which is good, but putting eids into it is not currently supported. The uids cookie already only holds around 30 IDs and there are 100+ bid adapters that want a share of it. |
@OllyTriple13 and @ian-lr - is this still relevant given the other various identify efforts the industry is working on? |
Hi all, |
Hi @jdelhommeau - you must have been at the Summit yesterday where this was mentioned, eh? :-) As noted, no one has stepped up to help pin this feature down. The proposal above is obviously in partly-done state:
Once the eids are stored in the
The people currently active in Prebid don't know the intricacies of AMP well enough to have a useful opinion here. The assumption made in the example above is that the publisher could set up a first party server (https%3A%2F%2Fexample.com%2Furl-encoded%3Fpath) that could return the EIDs in JSON. But perhaps there's some way to store EIDs in the javascript-poor environment that can just be read by load-cookie? Is there an equivalent of a "dom" or other local storage where EID data can be retrieved from a conventional location? Publishers who rely on AMP need to help drive this feature with what's possible and desirable. |
Thank you for your response! I am not sure the publisher first party server would work, because:
I need to look further into how an ID provider may establish his ID on an AMP page, and how it may be able to make that ID available to rest of the page (including prebid server). Also, as an alternative to using the uids cookie, I believe we could rely on RTC fast fetch macro, to retrieve the eid from somewhere on the page, and pass it directly as parameter to the prebid server endpoint. This would likely simplify steps 1 to 3. Still remains the questions of where do we get the EID from in the first place. I will start to look into it and keep this thread posted on my findings. |
Great feedback. Thanks for looking into this @jdelhommeau . If the EIDs could somehow be appended to the Prebid server /amp RTC call, that would be the best possible solution, IMO. e.g. "/amp?tag_id=BLAH&...&eids=ENCODEDDATASTRUCTURE Putting new things into the already-crowded and soon-to-die 3rd party PBS cookie seems sub-optimal. |
yes, agree with PBS cookie being sub optimal here. What I am looking at is this: https://github.com/ampproject/amphtml/blob/main/extensions/amp-a4a/rtc-documentation.md#fast-fetch-implementation-defined-macros |
Considering most Publishers are expected AMP deprecation from Google in the next 6 months I don't think anyone will build a first party server to deliver this and agree a publisher defined ID may in fact hold little value to external buyers - I don't think we would look to deploy this at this stage unless it was turnkey. I perceive to get a macro for RTC you'll need buy in from the AMP team (specifically, to put something in amp cache); the method proposed sounds similar to the amp-consent work we done; where the CMP process/service sets some consent string which is then cached and made available as a macro. Having something similar to call user ID services which then cache and are fetchable in RTC via some macro could work but I'm not sure how the AMP team would feel about that considering the amount of work it may entail vs. their wider plans for deprecation of AMP. You would also need some control to only call the user ID service IFF someone had consented on TCF (GDPR); this could be handled through amp-consent most likely. I hope my input helps and let us know if some simpler solution is finalised and we may be interested in testing it. |
Hi all, https://github.com/ampproject/amphtml/blob/main/src/service/real-time-config/callout-vendors.js Then vendors that rely on prebid server would need to update their code as such:
So adding the "eid=" placeholder in the url, and adding the EIDS macro in the list of macros that can be substituted by publisher. Change on prebid server would be to update the "/prebid/amp" url in order to support EID. Regarding format, I would suggest to go with the openRTB spec, turned in base64 url-safe.
Let me know what you think of the above. |
You'll need to email me or message me on LinkedIn or something - not officially confirmed but there are a number of indicators. |
@bretg , any feedback from prebid server side on the proposed solution? I understand AMP isn't top priority, but considering the level of effort on prebid server should be fairly low, I was wondering if you would be supportive of it (to summarize, simply need to update the prebid/amp url to add placeholder for eid macro. Then link that placeholder in prebid server to eid logic that should already exist for prebid server non AMP pages I imagine. full details here: #1404 (comment) |
This seems ok to me. I have some concern about the length of the overall GET string, but that can be addressed by placing it at the end in the template. Formalizing the requirements a bit:
Sound right? |
Thank you @bretg . If we clarify point 3, and as we agree on the other points, can you confirm if this is something that could be supported? What LOE do you expect, and associated timeline? Sorry, not that familiar (anymore) with prebid process, so maybe not questions you can answer right away. |
You're right, it goes under user, not user.data. Fixed. As for timeline, we'll discuss in this week's Prebid Server committee meeting with the aim to mark as 'ready-for-dev'. Then anyone in the community could contribute the code to either code base. Otherwise, this is not likely to be a high priority for any of the main project teams to build, so might take a while unless the Prebid Publisher committee makes a special request. |
Hi @bretg , I see this was moved to "ready for dev" which I take it as good news :) Correct? |
@jdelhommeau - correct. Your pull request would be welcome. |
It is not currently possible to pass userIds (e.g. user.ext.eids) to Prebid Server via AMP. While cookie-based syncs are enabled with the
amp-iframe
, this limits the information available to bidders processing requests from AMP pages. Given the growing popularity of both userIds and AMP, this seems like a good opportunity to extend Prebid Server capability.Acceptance Criteria
amp-ad
.Note, as AMP-RTC does not support eids , userIDs will likely need to be added to the query string or through some other Prebid-specific interface. A potential strawman follows.
The text was updated successfully, but these errors were encountered: