Browse Source

add Google Analytics

but I am still sure that every visitor who accidentally visits this site
is wise and blocks them...
tags/2016-05-10
Mikaela Suomalainen 4 years ago
parent
commit
eb87ff9cec
2 changed files with 13 additions and 0 deletions
  1. +11
    -0
      _includes/google_analytics.html
  2. +2
    -0
      _layouts/default.html

+ 11
- 0
_includes/google_analytics.html View File

@@ -0,0 +1,11 @@
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-40171169-6', 'auto');
ga('send', 'pageview');
ga(‘set’, ‘&uid’, {{USER_ID}}); // Määritä käyttäjätunnus käyttämällä sisäänkirjautunutta käyttäjätunnusta.

</script>

+ 2
- 0
_layouts/default.html View File

@@ -15,6 +15,8 @@

{% include footer.html %}

{% include google_analytics.html %}

</body>

</html>

Loading…
Cancel
Save