Ver código fonte

Enable Google Analytics in index.html

Signed-off-by: hossainemruz <emruz@appscode.com>
hossainemruz 4 anos atrás
pai
commit
769fdea9b8
1 arquivos alterados com 5 adições e 0 exclusões
  1. 5 0
      layouts/index.html

+ 5 - 0
layouts/index.html

@@ -13,6 +13,11 @@
     <link rel="stylesheet" href="/assets/css/projects.css" />
     <link rel="stylesheet" href="/assets/css/recent-posts.css" />
     <link rel="stylesheet" href="/assets/css/achievements.css" />
+
+    <!-- Add Google Analytics if enabled in configuration -->
+    {{ if .Site.GoogleAnalytics }}
+        {{ template "_internal/google_analytics_async.html" . }}
+    {{ end }}
   </head>
   <body data-spy="scroll" data-target="#top-navbar" data-offset="50">
     <!--- NAVBAR ------------------------->