Check that the hosting domain is actually a FreeBSD.org domain, so

we don't accidentally obtain data from mirrors.

Submitted by:		eadler (via email)
This commit is contained in:
Glen Barber 2011-08-16 23:19:35 +00:00
parent 8b5b159fb2
commit 49fd6cb456
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/www/; revision=37560

View file

@ -1,5 +1,11 @@
/* $FreeBSD$ */
/* $FreeBSD: www/en/layout/js/google.js,v 1.1 2011/08/15 00:30:17 gjb Exp $ */
h=document.location.host;
/*
* Check that the hosting domain is actually a FreeBSD.org domain, so
* we don't accidentally obtain data from mirrors.
*/
if (h == "www.freebsd.org" || h == "freebsd.org" || h == "wiki.freebsd.org") {
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-22767463-1']);
_gaq.push(['_trackPageview']);
@ -20,3 +26,5 @@ _gaq.push(['_setCustomVar',
s.parentNode.insertBefore(ga, s);
})();
}