Permalink
Browse files

add google analytics

  • Loading branch information...
jdvr committed Jun 8, 2016
1 parent 690e3be commit 1eb28a7ae30cc1b4d0c233537b96d9ec07734fea
Showing with 15 additions and 0 deletions.
  1. +14 −0 layout/_partial/google_analytics.ejs
  2. +1 −0 layout/_partial/head.ejs
@@ -0,0 +1,14 @@
<% if (theme.google_analytics){ %>
<!-- Google Analytics -->
<script type="text/javascript">
(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', '<%= theme.google_analytics %>', 'auto');
ga('send', 'pageview');
</script>
<!-- End Google Analytics -->
<% } %>
View
@@ -6,5 +6,6 @@
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="shortcut icon" href="<%- url_for(theme.favicon) %>">
<%- css('css/app') %>
<%- partial('google_analytics') %>
<!-- <link rel='stylesheet' href='http://fonts.useso.com/css?family=Source+Code+Pro'> -->
</head>

0 comments on commit 1eb28a7

Please sign in to comment.