(site) Add GA tracking

This commit is contained in:
Brandon Tilley 2013-12-25 14:18:29 -08:00
parent 3deb35de6b
commit 277b7f587b
5 changed files with 13 additions and 0 deletions

9
site/public/_ga.ejs Normal file
View File

@ -0,0 +1,9 @@
<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-46705270-1', 'planetaryjs.com');
ga('send', 'pageview');
</script>

View File

@ -12,5 +12,6 @@
<%- partial("_scripts") %>
<script type="text/javascript" src="js/homepage.js"></script>
<%- partial("_ga") %>
</body>
</html>

View File

@ -60,5 +60,6 @@
</div>
</div>
<script type='text/javascript' src='/js/prism.js'></script>
<%- partial("../_ga") %>
</body>
</html>

View File

@ -15,5 +15,6 @@
</div>
</div>
<script type='text/javascript' src='/js/prism.js'></script>
<%- partial("../_ga") %>
</body>
</html>

View File

@ -60,5 +60,6 @@
<%- partial("../../_scripts") %>
<script type='text/javascript' src='/js/lib/moment.min.js'></script>
<script type='text/javascript' src='/examples/quake/quake.js'></script>
<%- partial("../../_ga") %>
</body>
</html>