Shared Storage and URL Limits
Here we verify that the URL limit for SS is 8.
Conclusion, the code here creates 9 URLs, and the SS invocation fails. Que sad.
Test
Make sure you have your attestation over-rides.
The JS tries to run selectUrl with 9 urls:
const selectionURLs = [
{ url: 'https://www.privacy-sandbox-testing-one.com/testdeduction?special_id=0'},
{ url: 'https://www.privacy-sandbox-testing-one.com/testdeduction?special_id=1'},
{ url: 'https://www.privacy-sandbox-testing-one.com/testdeduction?special_id=2'},
{ url: 'https://www.privacy-sandbox-testing-one.com/testdeduction?special_id=3'},
{ url: 'https://www.privacy-sandbox-testing-one.com/testdeduction?special_id=4'},
{ url: 'https://www.privacy-sandbox-testing-one.com/testdeduction?special_id=5'},
{ url: 'https://www.privacy-sandbox-testing-one.com/testdeduction?special_id=6'},
{ url: 'https://www.privacy-sandbox-testing-one.com/testdeduction?special_id=7'},
{ url: 'https://www.privacy-sandbox-testing-one.com/testdeduction?special_id=8'},
];
async function injectContent() {
// Load the worklet module
await window.sharedStorage.worklet.addModule('/sharedstorage/deductiontesting/returnindex.js');
let indexId = getUrlParameter('special_id');
if (indexId === null) {
indexId = 0;
}
// Initially set the storage to sequential mode for the demo
await window.sharedStorage.set('special-id', indexId, {
ignoreIfPresent: false,
});
// Run the URL selection operation to determine the next content rendered.
const urls = selectionURLs.map(({ url }) => ({ url }));
const opaqueURN = await window.sharedStorage.selectURL('select-some-value', urls, {
data: selectionURLs,
resolveToConfig: false
});
Results
You can see the live results in console.log, or see the image below.