1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Added GA universal analytics support

Docker-DCO-1.1-Signed-off-by: Roberto Hashioka <roberto.hashioka@docker.com> (github: rogaha)
This commit is contained in:
Roberto Gandolfo Hashioka 2014-07-30 15:32:14 -07:00
parent 19c8e74fd3
commit e13b1fc05f

View file

@ -28,15 +28,15 @@
<![endif]--> <![endif]-->
{% if config.google_analytics %} {% if config.google_analytics %}
<script type="text/javascript"> <script type="text/javascript">
var _gaq = _gaq || []; (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
_gaq.push(['_setAccount', '{{ config.google_analytics[0] }}']); (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
_gaq.push(['_trackPageview']); m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
_gaq.push(['_trackPageLoadTime']); })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
(function() { ga('create', '{{ config.google_analytics[0] }}', 'docker.com');
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga('require', 'linkid', 'linkid.js');
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; ga('send', 'pageview', {
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); 'page': location.pathname + location.search + location.hash,
})(); });
</script> </script>
{% endif %} {% endif %}
</head> </head>