// assign google anaylytics key based on the hostname of originating web server. var _gaq_account = 'UA-15017327-12'; // non-prod analytics account var current_host = window.location.hostname; if ('cn-unm-1.dataone.org' === current_host || 'cn-ucsb-1.dataone.org' === current_host || 'cn-orc-1.dataone.org' === current_host || 'cn.dataone.org' === current_host) { _gaq_account = 'UA-15017327-9'; // production analytics account } var _gaq = _gaq || []; _gaq.push(['_setAccount', _gaq_account ]); _gaq.push(['_setDomainName', 'dataone.org']); _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); })();