File tree Expand file tree Collapse file tree 3 files changed +15
-0
lines changed Expand file tree Collapse file tree 3 files changed +15
-0
lines changed Original file line number Diff line number Diff line change 22
22
run : npm run codegen;npm run build
23
23
working-directory : web
24
24
25
+ - name : inject-analytics
26
+ run : misc/apply.sh dist/index.html
27
+ working-directory : web
28
+
25
29
- name : deploy (repo)
26
30
uses : JamesIves/github-pages-deploy-action@4.1.4
27
31
with :
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ sed -e ' s/<\/head>/\nINSERT_ANALYTICS\n&/' $1 | sed -e ' /INSERT_ANALYTICS/{r misc/ganalytics-tracking.html' -e ' d}' > /tmp/index.html
3
+ mv /tmp/index.html $1
Original file line number Diff line number Diff line change
1
+ < script async src ="https://www.googletagmanager.com/gtag/js?id=G-YC9LH690WX "> </ script >
2
+ < script >
3
+ window . dataLayer = window . dataLayer || [ ] ;
4
+ function gtag ( ) { dataLayer . push ( arguments ) ; }
5
+ gtag ( 'js' , new Date ( ) ) ;
6
+
7
+ gtag ( 'config' , 'G-YC9LH690WX' ) ;
8
+ </ script >
You can’t perform that action at this time.
0 commit comments