-
Notifications
You must be signed in to change notification settings - Fork 234
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
FLEDGE API changes to accommodate <fencedframe> size attribute changes #312
Comments
A secondary point: if FLEDGE knows the size upfront, it is easier to support templating the size into the render URL, as requested in #311. |
Hi, Except #311 is there any other reason for introducing this change?
I was wondering how this change would impact related subjects:
Best regards, |
Hi, sorry for the delay in responding. Thanks for the great questions. We actually didn’t have #311 in mind when we came up with the changes, but it is a happy coincidence that they make it easier to support. There are two main motivations for the proposal:
|
Thank you for detailed information, I would like to come back to this topic.
We have recently observed - in our real-publisher experiment - that around 8% of ad slot sizes in the EU are outside of the current allowed size list. And vary between regions. In the mentioned solution, size must be well defined. Have you considered where to put this information (maybe as a part of auctionConfig.auctionSignals?)
I understand the need for a restriction on the size of ad components as a potential source of information transfer between FFs (ad and ad-component). I was wondering how this could be done without breaking the above assumptions: Maybe instead: “All component ads in the same FF must be the same size” it would be ok to accept two : “All component ads in the same FF can be displayed at most two sizes.” |
As a reminder, these changes are related to the proposed fenced frame changes here. In brief, we replace the urn:uuid string with a structured WebIDL object (with potentially opaque attributes), and more aspects of the fenced frame are specified by the WebIDL object than before (e.g. size) to consolidate information flow. We now have a more concrete proposal for size-related API changes for FLEDGE (all of which would be opt-in for a transition period, and then eventually the old behavior would be removed). The API changes are designed so that FLEDGE has the information to prefetch the following modified k-anonymity checks (when the k-anonymity server eventually comes online):
**Note that size families (e.g., ads that are declared to scale with screen width in a particular aspect ratio) would be counted as a single size in k-anonymity checks. This change improves the design along the following axes:
The one potential downside is of course that given a fixed k-anonymity threshold, responsive ads displayed at multiple sizes that were collectively close to the threshold before the changes may now be below the threshold. But because the k-anonymity threshold hasn’t yet been decided, it doesn’t make sense to treat it as fixed: when it is determined, it will be taking all the privacy and utility factors at that time into account. Here is a full list of the API changes, roughly in decreasing order of significance:
|
@michal-kalisz Please see the update to the proposal, which we just posted above. Re the 8% of sizes not currently supported, we’re glad to hear that the increased flexibility here would be helpful. Re the k-anonymity check, yes, we do mean the tuple (url, size). We’re very interested to hear more about the “significant adverse effect” you mentioned. Is there a particular limit/value of k that you’re thinking about? Is the effect different for top-level ads vs. components? Re component ad sizes, the new version of the proposal is more flexible than previously described. (Each component in the same ad can have a different size.) The way you could implement that carousel ad would be something like:
We plan to discuss this proposal in the FLEDGE WICG meeting tomorrow. |
@gtanzer Thanks for the proposal. It looks good from my point of view. It would reduce the exposure of full responsive ads because of the k-anonymity constraint, as 10 different creatives would reduce the number of exposed users by 10. |
This CL adds 2 new size-related fields to joinAdInterestGroup: - adSizes: a dictionary that maps size names to a dictionary containing a width and height string. The width and height are expected to be in the format "##units". Acceptable values include "10px" and "200sw". The values must be > 0. Disallowed values include "-20px" and "0sw". - sizeGroups: a dictionary that maps group names to a list of size names This adds database support for this fields as well as parsing the fields and passing them over mojo. Right now, the field has no effect when running auctions. See Turtledove issue: WICG/turtledove#312 See Turtledove PR: WICG/turtledove#417 Fuchsia-Binary-Size: Size increase is unavoidable due to new Mojo types. Binary-Size: Size increase is unavoidable due to new Mojo types. Change-Id: I32f1fbb11988793172e7dbbbc50fbd9f86827ab3 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4167800 Reviewed-by: Daniel Cheng <dcheng@chromium.org> Reviewed-by: Russ Hamilton <behamilton@google.com> Reviewed-by: Caleb Raitto <caraitto@chromium.org> Commit-Queue: Liam Brady <lbrady@google.com> Cr-Commit-Position: refs/heads/main@{#1101466}
This CL is a first step to add size fields to the return value of generateBid(). In https://crrev.com/c/4167800, blink::InterestGroup::Size is introduced for adding sizes to joinAdInterestGroup(). It is declared as a nested struct inside blink::InterestGroup. When working on adding size fields to the return value of generateBid(), we should reuse this Size struct, instead of creating a new one, for BidderWorkletBid. The way it being declared as a nested struct have a few drawbacks: 1. This struct seems to serve InterestGroup only at first glance, but it will be used to represent general size info for various FLEDGE APIs soon: runAdAuction(), scoreAd(), reportResult() and reportWin(). 2. Clients that only need the size struct's declaration must include interest_group.h entirely. 3. Cannot be forward declared. This CL decouples the nested blink::InterestGroup::Size, to a standalone struct blink::AdSize. Some minor notes: 1. Update Size's operator== to compare units as well. 2. Although the struct traits for Size was defined in the related CL, the type was not mapped because no mapping was specified the BUILD.gn. This CL added the type mapping. This will later be used in the follow-up CL on generateBid(). 3. Added unit tests for Size. See Turtledove issue: WICG/turtledove#312 See Turtledove PR: WICG/turtledove#417 Bug: http://b/239866637 Related CL on adding sizes to joinAdInterestGroup(): https://crrev.com/c/4167800 Change-Id: I4a4dd47607102599bbeb33d05aa1ca5e6928ec5b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4296777 Commit-Queue: Xiaochen Zhou <xiaochenzh@chromium.org> Reviewed-by: Dominic Farolino <dom@chromium.org> Reviewed-by: Russ Hamilton <behamilton@google.com> Reviewed-by: Garrett Tanzer <gtanzer@chromium.org> Reviewed-by: Daniel Cheng <dcheng@chromium.org> Cr-Commit-Position: refs/heads/main@{#1112228}
Adds optional size field to generateBid()'s render and adComponents fields. The old behavior still works. For example: 1. render: "example.test" 2. render: {url: "example.test"} 3. render: {url: "example.test", width: "100sw", height: "50px"} 1. adComponents: ["example.test/1", "example.test/2"] 2. adComponents: [{url: "example.test/1"}, {url: "example.test/2"}] 3. adComponents: [ { url: "example.test/1", width: "10sw", height: "5px" }, { url: "example.test/2", width: "10sw", height: "5px" }, "example.test/3" ] 0. Currently these size fields have no effect on the result of generateBid() and runAdAuction(). All existing behaviors continue to work. 1. A new mojom type is introduced and type mapped to its blink representation: blink.mojom.AdDescriptor --> blink::AdDescriptor 2. BidderWorkletBid and content::InterestGroupAuction::Bid are updated to store the size info along with the ad url, using the structs above. See bidder_worklet.mojom and interest_group_auction.h. 3. As the type of 'render_url' and 'ad_components' changed from 'GURL' to 'blink::AdDescriptor', many functions' signatures are updated. 4. The parsing codes in set_bid_binding.cc to parse the new formats of the return value of generateBid(). 5. Added unit tests to bidder_worklet_unittest.cc. 6. We have not yet decided how to handle the size info at fenced frame config side, added TODO: crbug.com/1420638. 7. Marco substitutions, the logics of verifying sizes from interest group v.s sizes from bid, and more browser tests will be added in follow-up CLs. See Turtledove issue: WICG/turtledove#312 See Turtledove PR: WICG/turtledove#417 http://b/239866637 Decouple nested blink::InterestGroup::Size: https://crrev.com/c/4296777 Change-Id: I0b03f2ee70cf3c2b5ae20c89064767f5d9185060 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4301312 Reviewed-by: danakj <danakj@chromium.org> Reviewed-by: Russ Hamilton <behamilton@google.com> Reviewed-by: Garrett Tanzer <gtanzer@chromium.org> Commit-Queue: Xiaochen Zhou <xiaochenzh@chromium.org> Cr-Commit-Position: refs/heads/main@{#1113941}
In https://crrev.com/c/4167800, these mappings are added: 1. size groups --> ad size names 2. ad size names --> blink::AdSize This CL adds the mapping: ad --> size group Note: 1. FindMatchingAd is updated. Two ads are considered matching if: a. They have the same url, and neither has any size specified. b. They have the same url, and both have the same size specified. 2. Updated IDL, serialize/deserialize implementations, copy from IDL functions and InterestGroupAd mojom/mojom traits. 3. Added the builder pattern setters for ad size and size groups. 4. Added unit tests and browser tests. 5. The next CL will implement the macro substitution of sizes into the mapped url in fenced frame mapping, when auction is completed. See Turtledove issue: WICG/turtledove#312 See Turtledove PR: WICG/turtledove#417 Bug: http://b/239866637 Related CL on adding sizes to joinAdInterestGroup(): https://crrev.com/c/4167800 Decouple nested blink::InterestGroup::Size: https://crrev.com/c/4296777 Change-Id: I224c7285234e72ff5a7633b15c5ba256e43ef143 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4321037 Reviewed-by: Russ Hamilton <behamilton@google.com> Reviewed-by: Liam Brady <lbrady@google.com> Reviewed-by: Dominic Farolino <dom@chromium.org> Commit-Queue: Xiaochen Zhou <xiaochenzh@chromium.org> Cr-Commit-Position: refs/heads/main@{#1118329}
This CL implements the macro substitution for sizes. For example, assume the interest group ad and the bid both specify the ad having width of 100px and height of 50px: Before substitution: https://ad&size={%AD_WIDTH%}x{%AD_HEIGHT%} After substitution: https://ad&size=100x50 See Turtledove issue: WICG/turtledove#312 See Turtledove PR: WICG/turtledove#417 Change-Id: I92fb2f4f3edd55b4f2374e95ed8bafd5a98fe5a2 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4327282 Commit-Queue: Xiaochen Zhou <xiaochenzh@chromium.org> Reviewed-by: Garrett Tanzer <gtanzer@chromium.org> Reviewed-by: Russ Hamilton <behamilton@google.com> Cr-Commit-Position: refs/heads/main@{#1119375}
Now with FLEDGE auction able to be run with size specified for ad in interest groups and bids, the winning ad may contain size info. This CL propagates the size from the winning bid to the fenced frame config. With this, fenced frame navigations using configs should render an ad according to the size in the config object. See Turtledove issue: WICG/turtledove#312 See Turtledove PR: WICG/turtledove#417 Bug: 1347953 Change-Id: I436c9a989cd941ef3788fb7abe0c960945fc4abf Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4356285 Reviewed-by: Nasko Oskov <nasko@chromium.org> Commit-Queue: Xiaochen Zhou <xiaochenzh@chromium.org> Cr-Commit-Position: refs/heads/main@{#1126568}
size. Currently, for generateBid() and joinAdInterestGroup(), the supported ad size units are * "px": pixel * "sw": screen width This CL adds the unit: * "sh": screen height The parser is also updated to support parsing pure numbers as pixels. For example, "100" is parsed as 100 pixels. A regular expression is used to match the input, and capture the sub-patterns for value and unit. ^\s*((?:0|(?:[1-9][0-9]*))(?:\.[0-9]+)?)(px|sw|sh)?\s*$ It basically means we match 1. Zero or more leading spaces. 2. Numbers, with optionally decimal point and digits. No leading space, cannot begin with zero, non-negative. (Sub-pattern captured) 3. Immediately followed by an unit which can be one of "px", "sw" or "sh", or the unit can be ignored entirely. entirely. (Sub-pattern captured) 4. Zero or more trailing spaces. Bug: http://b/239866637 See Turtledove issue: WICG/turtledove#312 See Turtledove PR: WICG/turtledove#417 Change-Id: I336055ff3dd635dcdfd78999d0cb5972569f5ac1
size. Currently, for generateBid() and joinAdInterestGroup(), the supported ad size units are * "px": pixel * "sw": screen width This CL adds the unit: * "sh": screen height The parser is also updated to support parsing pure numbers as pixels. For example, "100" is parsed as 100 pixels. A regular expression is used to match the input, and capture the sub-patterns for value and unit. ^\s*((?:0|(?:[1-9][0-9]*))(?:\.[0-9]+)?)(px|sw|sh)?\s*$ It basically means we match 1. Zero or more leading spaces. 2. Numbers, with optionally decimal point and digits. No leading space, cannot begin with zero, non-negative. (Sub-pattern captured) 3. Immediately followed by an unit which can be one of "px", "sw" or "sh", or the unit can be ignored entirely. entirely. (Sub-pattern captured) 4. Zero or more trailing spaces. Bug: http://b/239866637 See Turtledove issue: WICG/turtledove#312 See Turtledove PR: WICG/turtledove#417 Change-Id: I336055ff3dd635dcdfd78999d0cb5972569f5ac1 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4402817 Commit-Queue: Xiaochen Zhou <xiaochenzh@chromium.org> Reviewed-by: Garrett Tanzer <gtanzer@chromium.org> Reviewed-by: Daniel Cheng <dcheng@chromium.org> Cr-Commit-Position: refs/heads/main@{#1137102}
size. Currently, for generateBid() and joinAdInterestGroup(), the supported ad size units are * "px": pixel * "sw": screen width This CL adds the unit: * "sh": screen height The parser is also updated to support parsing pure numbers as pixels. For example, "100" is parsed as 100 pixels. A regular expression is used to match the input, and capture the sub-patterns for value and unit. ^\s*((?:0|(?:[1-9][0-9]*))(?:\.[0-9]+)?)(px|sw|sh)?\s*$ It basically means we match 1. Zero or more leading spaces. 2. Numbers, with optionally decimal point and digits. No leading space, cannot begin with zero, non-negative. (Sub-pattern captured) 3. Immediately followed by an unit which can be one of "px", "sw" or "sh", or the unit can be ignored entirely. entirely. (Sub-pattern captured) 4. Zero or more trailing spaces. Bug: http://b/239866637 See Turtledove issue: WICG/turtledove#312 See Turtledove PR: WICG/turtledove#417 Change-Id: I336055ff3dd635dcdfd78999d0cb5972569f5ac1 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4402817 Commit-Queue: Xiaochen Zhou <xiaochenzh@chromium.org> Reviewed-by: Garrett Tanzer <gtanzer@chromium.org> Reviewed-by: Daniel Cheng <dcheng@chromium.org> Cr-Commit-Position: refs/heads/main@{#1137102}
… pure numbers input for ad size., a=testonly Automatic update from web-platform-tests FLEDGE: Enable screen height as unit and pure numbers input for ad size. Currently, for generateBid() and joinAdInterestGroup(), the supported ad size units are * "px": pixel * "sw": screen width This CL adds the unit: * "sh": screen height The parser is also updated to support parsing pure numbers as pixels. For example, "100" is parsed as 100 pixels. A regular expression is used to match the input, and capture the sub-patterns for value and unit. ^\s*((?:0|(?:[1-9][0-9]*))(?:\.[0-9]+)?)(px|sw|sh)?\s*$ It basically means we match 1. Zero or more leading spaces. 2. Numbers, with optionally decimal point and digits. No leading space, cannot begin with zero, non-negative. (Sub-pattern captured) 3. Immediately followed by an unit which can be one of "px", "sw" or "sh", or the unit can be ignored entirely. entirely. (Sub-pattern captured) 4. Zero or more trailing spaces. Bug: http://b/239866637 See Turtledove issue: WICG/turtledove#312 See Turtledove PR: WICG/turtledove#417 Change-Id: I336055ff3dd635dcdfd78999d0cb5972569f5ac1 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4402817 Commit-Queue: Xiaochen Zhou <xiaochenzh@chromium.org> Reviewed-by: Garrett Tanzer <gtanzer@chromium.org> Reviewed-by: Daniel Cheng <dcheng@chromium.org> Cr-Commit-Position: refs/heads/main@{#1137102} -- wpt-commits: 673c0db073476e169caf04637dd900ea56ce08ce wpt-pr: 39730
… pure numbers input for ad size., a=testonly Automatic update from web-platform-tests FLEDGE: Enable screen height as unit and pure numbers input for ad size. Currently, for generateBid() and joinAdInterestGroup(), the supported ad size units are * "px": pixel * "sw": screen width This CL adds the unit: * "sh": screen height The parser is also updated to support parsing pure numbers as pixels. For example, "100" is parsed as 100 pixels. A regular expression is used to match the input, and capture the sub-patterns for value and unit. ^\s*((?:0|(?:[1-9][0-9]*))(?:\.[0-9]+)?)(px|sw|sh)?\s*$ It basically means we match 1. Zero or more leading spaces. 2. Numbers, with optionally decimal point and digits. No leading space, cannot begin with zero, non-negative. (Sub-pattern captured) 3. Immediately followed by an unit which can be one of "px", "sw" or "sh", or the unit can be ignored entirely. entirely. (Sub-pattern captured) 4. Zero or more trailing spaces. Bug: http://b/239866637 See Turtledove issue: WICG/turtledove#312 See Turtledove PR: WICG/turtledove#417 Change-Id: I336055ff3dd635dcdfd78999d0cb5972569f5ac1 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4402817 Commit-Queue: Xiaochen Zhou <xiaochenzh@chromium.org> Reviewed-by: Garrett Tanzer <gtanzer@chromium.org> Reviewed-by: Daniel Cheng <dcheng@chromium.org> Cr-Commit-Position: refs/heads/main@{#1137102} -- wpt-commits: 673c0db073476e169caf04637dd900ea56ce08ce wpt-pr: 39730
Hi @gtanzer, thanks for all your previous clarifications. We are running an auction with the following config const result = await navigator.runAdAuction({
seller: "https://localhost:8443",
decisionLogicUrl: "https://localhost:8443/td/seller.js",
interestGroupBuyers: ["https://localhost:8444"],
auctionSignals: {
ad: {
size: {
width: 970,
height: 250,
},
},
},
resolveToConfig: true,
requestedSize: { width: 970, height: 250 },
}); However, the |
@eroncastro, was there a resolution to this? |
Inspecting the width and height fields on the returned FencedFrameConfig is currently nonfunctional. (We added nonfunctional stubs at some point and forgot to remove them before launch...) The config does have the container size and content size inside of it though. If you load the config inside of a fenced frame, it should automatically inherit the container size from inside the config. |
Thank you Garrett.
as well as
|
Hello @gtanzer. In today's WICG call, the Chrome team suggested I connect with you here. To boil it down, how does one get Chrome to replace the AD_WIDTH & HEIGHT macros after having submitted size metadata with the winning bid when rendering in an iframe? |
@dmdabbs These are our tests for ad size macroing, though they may be hard to read: i.e.:
then the macroing should automatically happen. Are you doing all of these steps? (in particular, maybe the size declarations in the interest group?) Are there any console logs? (not sure if we added these for the case where you return a size but it's not declared in the interest group declaration; that seems like something that would be useful for debugging) |
Thank you @gtanzer
Metadata with the submitted bid...
|
@dmdabbs Everything looks right to me... when you load the config into a fenced frame, does it freeze to that size? (the window.innerWidth and window.innerHeight upon loading) and 'render': {'url': renderURL, 'width': renderWidth, 'height': renderHeight} is the correct version. Is the old version reflected somewhere in the explainer, or just in this issue? |
No, @gtanzer. When I switch from
¯\(ツ)/¯
Yes. This explanatory text describes a sub-dictionary named
|
@dmdabbs Hmm... Do you have a website I could access that runs this code? I can step through with debug Chrome and see what's going wrong. This probably indicates there are failure cases where we need more console logs... And thanks, will fix that outdated reference in the explainer. |
(facepalm)
fixed it. Both iframe and FFs ad size macro substitutions now work as advertised.
YW. Clearer docs raise all boats. |
Currently, when a fenced frame used for rendering a FLEDGE ad is navigated to a urn:uuid, its content size is frozen based on the
<fencedframe>
element’s width and height attributes near that time.We would like to consolidate fenced frame information flow as follows: when a fenced frame is navigated to a urn:uuid, instead of combining information from the urn:uuid mapping and the embedder’s
<fencedframe>
element attributes, we will get information only from the urn:uuid mapping. Therefore, instead of mapping to a URL, the urn:uuid now maps to a set of attributes which includes a src URL, width, height, etc.In order to adjust FLEDGE to the fenced frame design changes, the following API changes would be necessary:
The text was updated successfully, but these errors were encountered: