Usage of deprecatedReplaceInURN for Macros in Query Params
deprecatedReplaceInURN Usage
Overview
Here we demonstrate usage of deprecatedReplaceInURN a bit. Chrome is in the process of making the availability and documentation of deprecatedReplaceInURN more official, but it will be around until 2026 as discussed here.
Prereqs
I haven't gotten back to Chrome yet on getting my attestation down, so for now see here.
Test
We do a relatively simple test here where this page (pst-one) is the "publisher page", uses pst-ssp.com to run a private auction on page, where pst-dsp.com is invited to bid and returns a creative served from pst-dsp.com.
See Me Work!!!
Submit messages you would like to see substituted into the call to the creative server. The "creative" will appear below with the full URL that went to the rendering endpoint.
Implications
This has a few implications:
- Most broadly, it means information from the publisher page can be passed into creative rendering frame without using nested iframes.
- The replacement is happening after the auction, meaning after the K test. This means that, within the boundaries of the attestation, you can pass in something like desired publisher styling for native, a callback for video reporting, etc.
Constraints and Non Implications
To explicitly call out a few things this doesn't allow:
- This still does not get information from the within the Private Auction, in particular any KV calls, into the rendering frame.
- This is currently slated for deprecation in 2026.
- Allowed macro styles are %%macro%% and ${macro} (see below for error with other forms)
Bad Macro Formats
Allowed macro styles are %%macro%% and ${macro}, else you get: