website_analytics (#1272)

This commit is contained in:
Richard Liaw
2017-11-29 10:01:59 -08:00
committed by Philipp Moritz
parent dd45664ab5
commit 7db07acc4f
3 changed files with 18 additions and 0 deletions
+6
View File
@@ -15,6 +15,12 @@ To view the site, run:
bundle exec jekyll serve
```
To view the site with Google Analytics, run:
```
JEKYLL_ENV=production bundle exec jekyll serve
```
## Deployment
To deploy the site, run
+1
View File
@@ -20,6 +20,7 @@ description: > # this means to ignore newlines until "baseurl:"
baseurl: "" # the subpath of your site, e.g. /blog
url: "" # the base hostname & protocol for your site, e.g. http://example.com
github_username: ray-project
google_analytics: true
# Build settings
markdown: kramdown
+11
View File
@@ -0,0 +1,11 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-110413294-2"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-110413294-2');
</script>