File tree 2 files changed +11
-0
lines changed
2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ marked.use(markedAlert());
32
32
* @returns {Promise<string> } name of output file (for status update)
33
33
*/
34
34
async function renderit ( infile ) {
35
+ const gtag = ( await fs . readFile ( 'gtag.html' , 'utf-8' ) ) . trim ( ) ;
35
36
console . log ( `Reading ${ infile } ` ) ;
36
37
basename = path . basename ( infile , ".md" ) ;
37
38
const outfile = path . join ( path . dirname ( infile ) , `${ basename } .html` ) ;
@@ -55,6 +56,7 @@ async function renderit(infile) {
55
56
// add CSS to HEAD
56
57
head . innerHTML =
57
58
head . innerHTML +
59
+ gtag + '\n' +
58
60
`<meta charset="utf-8">\n` +
59
61
`<link rel='stylesheet' type='text/css' media='screen' href='../reports-v2.css'>\n` +
60
62
`<link rel='stylesheet' type='text/css' media='screen' href='tr35.css'>\n` ;
Original file line number Diff line number Diff line change
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 >
You can’t perform that action at this time.
0 commit comments