﻿var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));

var perfil;

//recuperando o parâmetro desejado (código da concessão)    
var endereco = location.search.split("?");
var quebra1 = endereco[1].split("&");
var quebra2 = quebra1[0].split("=");

//Decidindo qual é o perfil com base no id da concessão
//Autogerais
if (quebra2[1] == 2) {
    perfil = "UA-6433663-2";
    //document.writeln("Autogerais");
}
//Granleste
if (quebra2[1] == 3) {
    perfil = "UA-6433663-3";
    //document.writeln("Granleste");
}
//Cotac
if (quebra2[1] == 9) {
    perfil = "UA-6433663-5";
    //document.writeln("Cotac");
}
//Suvep
if (quebra2[1] == 10) {
    perfil = "UA-6433663-6";
    //document.writeln("Suvep");
}
//Itavel
if (quebra2[1] == 11) {
    perfil = "UA-6433663-7";
    //document.writeln("Itavel");
}
//Sulpave
if (quebra2[1] == 12) {
    perfil = "UA-6433663-9";
    //document.writeln("Sulpave");
}
//Mocovel
if (quebra2[1] == 16) {
    perfil = "UA-6433663-10";
    //document.writeln("Mocovel");
}
//Bavepel
if (quebra2[1] == 13) {
    perfil = "UA-6433663-9";
    //document.writeln("Bavepel");
}
//Canadá Veiculos
if (quebra2[1] == 20) {
    perfil = "UA-6433663-11";
    //document.writeln("Canadá veículos");
}
//Canadá Veiculos
if (quebra2[1] == 23) {
    perfil = "UA-4014366-5";
    document.writeln("Dutra veículos: " + perfil);
}
//else {
//perfil = "0";
//}

//document.writeln("Perfil: " + perfil);

//função original google   
try {
    var pageTracker = _gat._getTracker(perfil);
    pageTracker._trackPageview();
} catch (err) { }