Add google analytics (#745)
This commit is contained in:
parent
323a84bd45
commit
ce824d0a33
|
@ -6,6 +6,7 @@ _main.rds
|
||||||
_book
|
_book
|
||||||
*.md
|
*.md
|
||||||
*.html
|
*.html
|
||||||
|
!ga_script.html
|
||||||
search_index.json
|
search_index.json
|
||||||
libs
|
libs
|
||||||
*.rds
|
*.rds
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
bookdown::gitbook:
|
bookdown::gitbook:
|
||||||
|
includes:
|
||||||
|
in_header: [ga_script.html]
|
||||||
config:
|
config:
|
||||||
toc:
|
toc:
|
||||||
collapse: section
|
collapse: section
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
<!-- Global site tag (gtag.js) - Google Analytics -->
|
||||||
|
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-115082821-1"></script>
|
||||||
|
<script>
|
||||||
|
window.dataLayer = window.dataLayer || [];
|
||||||
|
function gtag(){dataLayer.push(arguments);}
|
||||||
|
gtag('js', new Date());
|
||||||
|
|
||||||
|
gtag('config', 'UA-115082821-1');
|
||||||
|
</script>
|
Loading…
Reference in New Issue