-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #268 from privacysandbox/dev
Update instream video ad demo documentation
- Loading branch information
Showing
25 changed files
with
138 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
let dsp = document.currentScript.getAttribute('dsp'); | ||
window.addEventListener('load', (event) => { | ||
let iframe = document.createElement('iframe'); | ||
let iframeAws = document.createElement('iframe'); | ||
let iframeGcp = document.createElement('iframe'); | ||
// let dsp = document.currentScript.getAttribute('dsp'); | ||
iframe.src = `https://${dsp}/private-aggregation`; | ||
document.body.appendChild(iframe); | ||
iframeAws.src = `https://${dsp}/private-aggregation-aws`; | ||
iframeGcp.src = `https://${dsp}/private-aggregation-gcp`; | ||
document.body.appendChild(iframeAws); | ||
document.body.appendChild(iframeGcp); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
async function runPrivateAggregationAws() { | ||
const privateAggCloud = { | ||
'privateAggregationConfig': { | ||
'aggregationCoordinatorOrigin': | ||
'https://publickeyservice.msmt.aws.privacysandboxservices.com', | ||
}, | ||
}; | ||
await window.sharedStorage.worklet.addModule( | ||
'js/private-aggregation-worklet-aws.js', | ||
); | ||
await window.sharedStorage.run('test-private-aggregation', privateAggCloud); | ||
} | ||
|
||
runPrivateAggregationAws(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
async function runPrivateAggregationGcp() { | ||
const privateAggCloud = { | ||
'privateAggregationConfig': { | ||
'aggregationCoordinatorOrigin': | ||
'https://publickeyservice.msmt.gcp.privacysandboxservices.com', | ||
}, | ||
}; | ||
await window.sharedStorage.worklet.addModule( | ||
'js/private-aggregation-worklet-gcp.js', | ||
); | ||
await window.sharedStorage.run('test-private-aggregation', privateAggCloud); | ||
} | ||
|
||
runPrivateAggregationGcp(); |
2 changes: 1 addition & 1 deletion
2
.../public/js/private-aggregation-worklet.js → ...lic/js/private-aggregation-worklet-aws.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
services/dsp/src/public/js/private-aggregation-worklet-gcp.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
class TestPrivateAggregation { | ||
async run(data) { | ||
console.log('Enabling GCP Private Aggregation Debug Mode'); | ||
privateAggregation.enableDebugMode({debugKey: 1234n}); | ||
let campaignId = await sharedStorage.get('campaignId'); | ||
if (!campaignId) { | ||
console.log( | ||
'No campaign id found for client. Adding campaignId 1234567890.', | ||
); | ||
campaignId = '1234567890'; | ||
sharedStorage.set('campaignId', campaignId); | ||
} else { | ||
console.log(`Campaign ID found: ${campaignId}`); | ||
} | ||
function convertToBucket(bucketId) { | ||
return BigInt(bucketId); | ||
} | ||
const bucket = convertToBucket(campaignId); | ||
const value = 128; | ||
privateAggregation.contributeToHistogram({bucket, value}); | ||
} | ||
} | ||
|
||
register('test-private-aggregation', TestPrivateAggregation); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<html> | ||
<header> | ||
<script src="/js/private-aggregation-aws.js"></script> | ||
</header> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<html> | ||
<header> | ||
<script src="/js/private-aggregation-gcp.js"></script> | ||
</header> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/bash | ||
|
||
npm install | ||
|
||
npm run cert | ||
|
||
cd services/home | ||
|
||
npm install | ||
|
||
npm run build | ||
|
||
cd ../.. | ||
|
||
sudo npm run start |