Skip to content
This repository was archived by the owner on Nov 7, 2025. It is now read-only.
This repository was archived by the owner on Nov 7, 2025. It is now read-only.

Support for Slot-Size macro replacement on render_url #311

Description

@tylerdev0

I have been working on a Fledge implementation and have come across an issue regarding support for ads with multiple options for dimensions.

For a given ad, we may have multiple different creative dimensions that we support. For example we may have a separate creative for each of the following dimensions: [[160, 600], [245, 250], [300, 250], [300, 600], ...]

We refer to these as "responsive ads" and this allows us to place a bid for a single ad and adapt the creative response based on the slot-size which was communicated through the bid request.

In the current Fledge spec, the render_url for an ad that is included in an interest group is a static url with no support for macro replacement. This means that in order for us to support multiple sizes we must include multiple copies of the same ad within an interest group and our bidding function must manually filter the list of ads to find ads whose creative dimensions match the slot-size.

This duplication of every single ad to include all of the sizes which it supports will eventually become un-scalable for our needs. As an example if we wish to include 100 ads in an interest group, and we must include 15 copies of each ad (one for each dimension we support) it would require us to insert 1,500 ads in an interest group. Not only does this add bloat to the interest group object stored in the browser, but it also impacts the latency of our bidding function as it must perform manual filtering for the slot size.

In addition to impacting the size of the interest group and the performance of the bidding function, this also impacts k-anonymity of our ads in a negative way. Each distinct creative size would be subject to k-anonymity independently even though they are effectively the same ad. For less common slot sizes it would become difficult to meet k-anonymity if we treat each creative dimension as its own ad.

Would it be possible for the render_url to support a macro for the slot height and width so that we can respond with an appropriately sized creative. For example the render_url could be formatted as:
https://cdn.com/url-of-winning-creative.html?size={%SLOT_HEIGHT%}x{%SLOT_WIDTH$}

The exact formatting doesn't really matter as long as there is some method to communicate the slot size at the time of the creative request.

The slot dimensions are already communicated via the contextual request so this should not have any impact on privacy. Slot sizes are fairly standard and determined by the publisher so there should be no risk of this macro leaking any information that could be used by sellers to learn information about the user.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Non-breaking Feature RequestFeature request for functionality unlikely to break backwards compatibility

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions