Skip to content

Commit

Permalink
CLDR-15821 v47 add Analytics to spec (#4138)
Browse files Browse the repository at this point in the history
  • Loading branch information
srl295 authored Oct 17, 2024
1 parent 9259d86 commit a220913
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tools/scripts/tr-archive/archive.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ marked.use(markedAlert());
* @returns {Promise<string>} name of output file (for status update)
*/
async function renderit(infile) {
const gtag = (await fs.readFile('gtag.html', 'utf-8')).trim();
console.log(`Reading ${infile}`);
basename = path.basename(infile, ".md");
const outfile = path.join(path.dirname(infile), `${basename}.html`);
Expand All @@ -55,6 +56,7 @@ async function renderit(infile) {
// add CSS to HEAD
head.innerHTML =
head.innerHTML +
gtag + '\n' +
`<meta charset="utf-8">\n` +
`<link rel='stylesheet' type='text/css' media='screen' href='../reports-v2.css'>\n` +
`<link rel='stylesheet' type='text/css' media='screen' href='tr35.css'>\n`;
Expand Down
9 changes: 9 additions & 0 deletions tools/scripts/tr-archive/gtag.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-BPN1D3SEJM"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', 'G-BPN1D3SEJM');
</script>

0 comments on commit a220913

Please sign in to comment.