/* ***********************************************************************
 * Script: google-analytics.js
 * --------------------
 * Author: Nitin Uchil
 * Date: June 2010
 * Version: 1.0.0
 *
 * Google Analytics tagging for Allstate Teen Driver Site
 * Google Analytics Account = UA-16658726
 * Profiles:
 *        1 = Production Web Site
 *        2 = Localhost (For Developer Unit Testing)
 *        3 = DEV Environment (Acquity Group) for Functional Testing
 *        4 = STAGING Environment (AG + FMR) for Integration Testing
 *        5 = QA Environment (AG + FMR) for Load Testing
 *        6 = FMR DEV (FMR) for Integration Testing
 *        7 - FMR PROD (For hits on FMR pages - this could be profile 1)
 * 
 **************************************************************************/
var _gaq = _gaq || [];
var profileNo = 2;
if (hostname == "www.allstateteendriver.com") {
  profileNo = 1;
} else if (hostname == "localhost") { 
  profileNo = 2;
} else if (hostname == "10.6.4.107") {
  profileNo = 3;
} else if (hostname == "staging.allstateteendriver.com") {
  profileNo = 4;
} else if (hostname == "10.50.50.114" || hostname == "10.50.40.46" || hostname == "10.50.40.47" || hostname == "38.98.176.216" || hostname == "allstatetdp.qa.acquityondemand.com") {
  profileNo = 5;
} else if (hostname == "astddev.fmreps.com") {
  profileNo = 6;
} else if (hostname == "fmrprod.allstateteendriver.com") {
  profileNo = 7;
}
_gaq.push(['_setAccount', 'UA-16658726-'+profileNo]);
_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);
})();