This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var getSubdomain = function (baseDomain) { | |
if (!baseDomain) { | |
return null; | |
} | |
var regSub = new RegExp('^((?!' + baseDomain + '|www)([^.]*))', 'g'); | |
var _subdomain = document.location.hostname.match(regSub); | |
if (_subdomain && _subdomain[0]) { | |
return _subdomain[0]; | |
} else { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//replace UA-XXXXXXXX-X *ONLY* with your real UA Account ID. | |
//DO not replace the UA-99999999-X with anything, as that is the point of this. | |
var _gaq = _gaq || []; | |
(function () { | |
var ga = document.createElement('script'); | |
ga.type = 'text/javascript'; | |
ga.async = true; | |
ga.src = 'https://ssl.google-analytics.com/ga.js'; | |
var s = document.getElementsByTagName('script')[0]; |
NewerOlder