-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TW-1263: [research] Google Ad Manager
- Loading branch information
Showing
1 changed file
with
79 additions
and
0 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
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> |