Add Google analytics to github.io page
This commit is contained in:
parent
5fd7ba4d06
commit
7f471aae47
|
|
@ -14,6 +14,8 @@ copyright_url: "https://jetbrains.com"
|
|||
homepage: "https://jetbrains.com/mps"
|
||||
homepage_title: "JetBrains MPS"
|
||||
github-project: fisakov/mps-coderules
|
||||
# Google Analytics
|
||||
google_analytics: UA-124237176-1
|
||||
|
||||
# Build settings
|
||||
markdown: kramdown
|
||||
|
|
|
|||
|
|
@ -0,0 +1,9 @@
|
|||
<!-- Global site tag (gtag.js) - Google Analytics -->
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id={{ site.google_analytics }}"></script>
|
||||
<script>
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag(){dataLayer.push(arguments);}
|
||||
gtag('js', new Date());
|
||||
|
||||
gtag('config', '{{ site.google_analytics }}');
|
||||
</script>
|
||||
|
|
@ -3,6 +3,9 @@
|
|||
<!-- Copyright (c) 2017 James King -->
|
||||
<!-- MIT License https://opensource.org/licenses/MIT -->
|
||||
{% endcomment %}
|
||||
{% if site.google_analytics and jekyll.environment == 'production' %}
|
||||
{% include google-analytics.html %}
|
||||
{% endif %}
|
||||
<meta charset="utf-8"/>
|
||||
<script defer src="https://code.getmdl.io/1.3.0/material.min.js"></script>
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
|
||||
|
|
|
|||
Loading…
Reference in New Issue