Skip to content

Supporting creative macros in FLEDGE #477

Open
@sewoomg

Description

@sewoomg

Context

Third-party tracking is a feature that advertisers commonly use when buying through DSPs. There are many use cases for 3p tracking, and one example is to allow unified reporting across multiple DSPs over time.

3p tracking works through the use of creative macros. The advertiser configures html + js, or specific tracking URLs, as a part of their creatives in the DSP UI. These creatives can contain macros, which are meant to be populated/replaced with contextual and ad-related data at rendering time.

With FLEDGE, when rendering into a Fenced Frame, the DSP does not have contextual data at rendering time and cannot populate macros that include contextual data. While Fenced Frame Ads Reporting (FFAR) can be used to send both contextual and ad-related signals, use of FFAR will require the DSP to know all of the 3p URL endpoints and coordinate with each of the vendors to identify all events tracked and agree on url formats. Instead, we propose preserving macro functionality and creating a new way to populate these macros.

Proposal

  1. Add a new function, RegisterAdMacro, similar to RegisterAdBeacon, to allow the reporting worklet to 1)pass contextual/publisher data and 2)control which 3p tracking vendor get access to data, via Fenced Frame reportEvent calls.

RegisterAdMacro takes 3 arguments:

  • macro_name: a string that can appear in destination_template when calling reportEventWithMacros
  • macro_value: a string that Chrome will use to replace instances of macro_name in destination_template.
  • origin_allowlist: a list of destination origins allowed to receive this macro value. Can be set to "*" to allow replacement in all destination origins.
  1. Modify reportEvent, or define a new function reportEventWithMacros, to allow passing a URL containing macros that will be populated with the signals set from the reporting worklet before sending the beacon.

Example

An advertiser adds the following to their creative tag to count viewable impressions and attribute those to a specific campaign, publisher and website.

In buyer's reportWin worklet, the DSP registers AdBeacons and AdMacros:

RegisterAdMacro('PUBLISHER_ID', 444, '*');
//This macro will be populated for all origins as denoted by '*'
RegisterAdMacro('SOURCE_URL_ENC', 'http%3A%2F%2Fpub%2Eexample%2Fpage', 'adtech.example');
//This macro will only be populated when origin matches what is allowed in the third argument, 'adtech.example'

When rendering the creative, the DSP would replace macros that do not require contextual/publisher information as part of rendering, including ${CAMPAIGN_ID} in this example, so the tag sent to the browser would be:

The script returned can use the new version of reportEvent to send reporting pings with contextual data populated by chrome at a time of the 3p vendor's choosing. For example:

window.fence.reportEventWithMacros({
  'destination_template': 'https://adtech.example/impression?cid=555&pub_id=${PUBLISHER_ID}&site=${SOURCE_URL_ENC}&t=123'
});

Chrome would replace the ${PUBLISHER_ID} and ${SOURCE_URL_ENC} macros with the values registered in reportWin before sending the request. So the 3p vendor receives the beacon at

https://adtech.example/impression?cid=555&pub_id=444&site=http%3A%2F%2Fpub%2Eexample%2Fpage&t=123

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