Browse Source

Added GA Tag

Yoginth 7 years ago
parent
commit
9c0155ecff
2 changed files with 11 additions and 0 deletions
  1. 9 0
      templates/base/ga.tmpl
  2. 2 0
      templates/base/head.tmpl

+ 9 - 0
templates/base/ga.tmpl

@@ -0,0 +1,9 @@
+<!-- Global site tag (gtag.js) - Google Analytics -->
+<script async src="https://www.googletagmanager.com/gtag/js?id=UA-107259345-2"></script>
+<script>
+  window.dataLayer = window.dataLayer || [];
+  function gtag(){dataLayer.push(arguments);}
+  gtag('js', new Date());
+
+  gtag('config', 'UA-107259345-2');
+</script>

+ 2 - 0
templates/base/head.tmpl

@@ -90,6 +90,8 @@
 		});
 	}
  	</script>
+ 	
+ 	{{template "base/ga" .}}
 
 	<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
 	<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.AreYouSure/1.9.0/jquery.are-you-sure.min.js"></script>