diff --git a/_config.yml b/_config.yml index 7f65fda..dc2de13 100644 --- a/_config.yml +++ b/_config.yml @@ -8,4 +8,4 @@ email: skip@gota.gu.se instagram_username: "skip.gu" linkedin_username: "company/skip-student-association" discord_link: "https://tinyurl.com/skip-discord" -# google_analytics: G-96M5M9TCM7 +google_analytics: G-96M5M9TCM7 diff --git a/_includes/google-analytics.html b/_includes/google-analytics.html index e6ad14f..0d053f2 100644 --- a/_includes/google-analytics.html +++ b/_includes/google-analytics.html @@ -1,12 +1,10 @@ - - + + + gtag('config', '{{ site.google_analytics }}'); + diff --git a/_includes/head.html b/_includes/head.html index 86cc372..b05d1aa 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -43,4 +43,8 @@ {% endcomment %} {% include head-feed.html %} {% endif %} + + {% if jekyll.environment == 'production' and site.google_analytics %} + {% include google-analytics.html %} + {% endif %}