Skip to content

Commit 253fdbe

Browse files
authored
CLDR-18031 v46: add analytics to spec (#4140)
1 parent 6a4f7a5 commit 253fdbe

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

tools/scripts/tr-archive/archive.js

+2
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ marked.use(markedAlert());
3232
* @returns {Promise<string>} name of output file (for status update)
3333
*/
3434
async function renderit(infile) {
35+
const gtag = (await fs.readFile('gtag.html', 'utf-8')).trim();
3536
console.log(`Reading ${infile}`);
3637
basename = path.basename(infile, ".md");
3738
const outfile = path.join(path.dirname(infile), `${basename}.html`);
@@ -55,6 +56,7 @@ async function renderit(infile) {
5556
// add CSS to HEAD
5657
head.innerHTML =
5758
head.innerHTML +
59+
gtag + '\n' +
5860
`<meta charset="utf-8">\n` +
5961
`<link rel='stylesheet' type='text/css' media='screen' href='../reports-v2.css'>\n` +
6062
`<link rel='stylesheet' type='text/css' media='screen' href='tr35.css'>\n`;

tools/scripts/tr-archive/gtag.html

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<!-- Google tag (gtag.js) -->
2+
<script async src="https://www.googletagmanager.com/gtag/js?id=G-BPN1D3SEJM"></script>
3+
<script>
4+
window.dataLayer = window.dataLayer || [];
5+
function gtag(){dataLayer.push(arguments);}
6+
gtag('js', new Date());
7+
8+
gtag('config', 'G-BPN1D3SEJM');
9+
</script>

0 commit comments

Comments
 (0)