Skip to content

Commit

Permalink
add google analytics snippet
Browse files Browse the repository at this point in the history
  • Loading branch information
prakhar1989 committed Jul 18, 2016
1 parent b7c139f commit 2c31553
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 23 deletions.
17 changes: 6 additions & 11 deletions build/tweaks/analytics.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
script = '''
<!-- Asynchronous Google Analytics snippet -->
<script>
var _gaq = _gaq || [];
var pluginUrl = '//www.google-analytics.com/plugins/ga/inpage_linkid.js';
_gaq.push(['_require', 'inpage_linkid', pluginUrl]);
_gaq.push(['_setAccount', 'UA-18504951-1']);
_gaq.push(['_trackPageview']);
(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','https://www.google-analytics.com/analytics.js','ga');
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
ga('create', 'UA-40692332-3', 'auto');
ga('send', 'pageview');
</script>
'''
19 changes: 7 additions & 12 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1313,18 +1313,13 @@ <h2 id="references">References</h2>
<li><a href="https://medium.com/@j_mcnally/a-beginner-s-guide-to-deploying-production-web-apps-to-docker-9458409c6180?_tmc=WrhaI1ejJlMmTpUmHOhTFZsYaUSPUP1yvyq19dsRQ5A#.bl50ga0uz">A beginner's guide to deploying production web apps</a></li>
<li><a href="https://aggarwalarpit.wordpress.com/2015/12/06/running-web-application-in-linked-docker-containers-environment/">Running Web Application in Linked Docker Containers Environment</a></li>
</ul>
<!-- Asynchronous Google Analytics snippet -->
<script>
var _gaq = _gaq || [];
var pluginUrl = '//www.google-analytics.com/plugins/ga/inpage_linkid.js';
_gaq.push(['_require', 'inpage_linkid', pluginUrl]);
_gaq.push(['_setAccount', 'UA-18504951-1']);
_gaq.push(['_trackPageview']);

(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
(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','https://www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-40692332-3', 'auto');
ga('send', 'pageview');
</script>
</body></html>

0 comments on commit 2c31553

Please sign in to comment.