Skip to content

Commit

Permalink
TW-1263: [research] Google Ad Manager
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-tsx committed Jan 31, 2024
1 parent 6db8396 commit 582ac7b
Showing 1 changed file with 79 additions and 0 deletions.
79 changes: 79 additions & 0 deletions public/misc/google-ads/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
<!--
Serve this page by:
```bash
yarn global add http-server
yarn serve-google-ads
```
-->

<!DOCTYPE html>
<html lang="">

<head>
<meta charset="utf-8" />
<!-- <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" /> -->
<title>Temple Wallet | Google Ad Manager's ads</title>

<!-- SCRIPTS | See: https://developers.google.com/publisher-tag/guides/get-started -->

<script async src="https://securepubads.g.doubleclick.net/tag/js/gpt.js"></script>
<!-- <script src="./index.js"></script> -->
<!-- <script>
console.log('IFRAME', 1, window.googletag);
console.log('IFRAME', 2, window === globalThis);
console.log('IFRAME', 3, window.localStorage);
console.log('IFRAME', 4, window.sessionStorage);
console.log('IFRAME', 5, window.sharedStorage);
setTimeout(() => {
console.log('IFRAME', 1.1, window.googletag);
}, 5_000);
</script> -->

<script>
window.googletag = window.googletag || { cmd: [] };

googletag.cmd.push(() => {
// Define an ad slot for div with id "banner-ad".
googletag
.defineSlot(
/* 1 */
"/6355419/Travel/Europe/France/Paris",
[300, 250],
// [728, 90],
/* 2 */
// "/6355419/Travel/Europe",
// ["fluid"],
"ad-slot"
)
.addService(googletag.pubads());

// Enable the PubAdsService.
googletag.enableServices();
});
</script>

<style>
body {
margin: 0;
}
</style>
</head>

<body>
<div id="ad-slot">
<!-- Place for ad to be inserted into
With React, it would be handled by `react-ad-manager` lib
-->
</div>

<script>
googletag.cmd.push(() => {
// Request and render an ad for the "banner-ad" slot.
googletag.display("ad-slot");
});
</script>
</body>

</html>

0 comments on commit 582ac7b

Please sign in to comment.