/**Omniture tracking logic included in all pages via the footer include.*/function clickTrackSwbdLstg(clickType, busNameEsc, busCategoryEsc){
//Switchboard click tracking:
// Currently implemented on results page and detail page.
//08-05-08: CMM Fixed javascript error caused by single quote in busName and/or
//busCategory. Results page and detail page replace single quote with %27 so
//that they can be passed as parms to this routine and then the unescape function
//below converts data back to a single quote for Omniture logging purposes.
var busName = unescape(busNameEsc);
var busCategory = unescape(busCategoryEsc);
var p = clickType.split(":");
//Taxonomy will indicate if click came from LR (Listing Results) or BP (Bus. Profile) page
var pgClick = p[0];
//08-15-08: CMM - Chg omniture server setting to a web-xml parameter. Setting is read and
//stored in SwbdConstants and then assigned when SwbdTrackingInfo is instantiated. Footer
//include logic takes value from tracking-model and assigns javascript s_account variable.
//var s_account="superpagesswitchbd" - PRODUCTION
//var s_account="superpagesswitchbddev" - TEST
var s = s_gi(s_account);
//alert("busNameEsc: " + busNameEsc + "\n" + "busName : " + busName + "\n" + "\n" +
// "busCategoryEsc: " + busCategoryEsc + "\n" + "busCategory : " + busCategory);
s.linkTrackVars = "eVar5,eVar7,eVar17,prop2,prop4,prop26,events";
if (pgClick == "LR") {
s.linkTrackEvents = "event7";
s.events="event7";
}
else if (pgClick == "BP") {
s.linkTrackEvents = "event20";
s.events="event20";
}
s.eVar17 = clickType;
s.prop26 = clickType;
s.eVar7 = busName;
s.prop2 = busName;
//parse out first category from string list of categories
var a = busCategory.split(",");
s.eVar5 = a[0];
s.prop4 = a[0];
s.tl(this,"o","Switchboard");
//reset vars to avoid double counting if superpages tracks the clickthru
s.linkTrackVars = "None";
s.linkTrackEvents = "None";
s.events = "";
s.eVar17 = "";
s.prop26 = "";
s.eVar7 = "";
s.prop2 = "";
s.eVar5 = "";
s.prop4 = "";
}
function clickTrackWebSearch(clickType) {
//Switchboard click tracking:
// Currently implemented on web search results page.
//alert("clickType: " + clickType);
var s = s_gi(s_account);
s.linkTrackVars = "eVar41,events";
s.linkTrackEvents = "event16";
s.events="event16";
s.eVar41 = "WS:" + clickType;
s.tl(this,"o","Switchboard");
}
function clickTrackWebSearchResults(clickType) {
//Switchboard click tracking:
// Currently implemented on web search results page.
//alert("clickType: " + clickType);
var s = s_gi(s_account);
s.linkTrackVars = "eVar41,events";
s.linkTrackEvents = "event19";
s.events="event19";
s.eVar41 = "WSR:" + clickType;
s.tl(this,"o","Switchboard");
}
function clickTrackWebSearchPreferences(prefs) {
//Switchboard click tracking:
// Currently implemented on web search results page.
//alert("prefs: " + prefs);
var p = prefs.split("/");
var filter = p[0];
var spelling = p[1];
if (spelling == '0') { spelling = "off"; }
else { spelling = "on"; }
var s = s_gi(s_account);
s.linkTrackVars = "prop29";
s.prop29 = "Search Preferences Save Settings:Filter:" + filter + ":Spelling:" + spelling;
s.tl(this,"o","Switchboard");
}
function clickTrackWebSearchExit(clickType, paidLstg, destinationURL) {
//Switchboard click tracking:
// Currently implemented on web search results page.
// alert("clickType: " + clickType + "\n" +
// "paidLstg: " + paidLstg + "\n" +
// "destinationURL: " + destinationURL);
var s = s_gi(s_account);
var listingType = ""
if (paidLstg == "true") { listingType = "Paid Listing"; }
else { listingType = "Unpaid Listing"; }
s.linkTrackVars = "prop28,eVar40,eVar41,events";
s.linkTrackEvents = "event19";
s.events="event19";
s.prop28 = listingType + ":" + destinationURL;
s.eVar40 = s.prop28;
s.eVar41 = "WSR:" + clickType;
//CMM - Don't need to write out external link, it will be done automatically
//s.tl(this,"e","Switchboard");
}
function clickTrackIntel(type){
//Intelius types of tab click tracking:
// Find a Person : Search by Phone : Area & Zip Codes
//08-15-08: CMM - Chg omniture server setting to a web-xml parameter. Setting is read and
//stored in SwbdConstants and then assigned when SwbdTrackingInfo is instantiated. Footer
//include logic takes value from tracking-model and assigns javascript s_account variable.
//var s_account="superpagesswitchbd" - PRODUCTION
//var s_account="superpagesswitchbddev" - TEST
var s = s_gi(s_account);
s.linkTrackVars = "eVar22,events";
s.linkTrackEvents = "event30";
s.events="event30";
s.eVar22 = type + " - Intelius";
void(s.tl(this,"o",type + " Tab"));
}
function clickTrackInfo(type){
//Infospace types of web search exit click tracking:
// Web : Images : Audio : Video : News :
// Advanced Web Search : Preferences : Tools & Tips
//08-15-08: CMM - Chg omniture server setting to a web-xml parameter. Setting is read and
//stored in SwbdConstants and then assigned when SwbdTrackingInfo is instantiated. Footer
//include logic takes value from tracking-model and assigns javascript s_account variable.
//var s_account="superpagesswitchbd" - PRODUCTION
//var s_account="superpagesswitchbddev" - TEST
var s = s_gi(s_account);
s.linkTrackVars = "eVar29,events";
s.linkTrackEvents = "event29";
s.events="event29";
s.eVar29 = "Infospace - Web search - " + type;
void(s.tl(this,"o","Infospace"));
}
function clickTrackSwbdAttr(clickType, busNameEsc, busCategoryEsc){
//Detail page replaces single quote with %27 so that they can be passed as parms to this
//routine and then the unescape function below converts data back to a single quote for
//Omniture logging purposes.
var busName = unescape(busNameEsc);
var busCategory = unescape(busCategoryEsc);
//ClickType taxonomy is page : attribute name : action
//Taxonomy will indicate if click came from LR (Listing Results) or BP (Bus. Profile) page
// var p = clickType.split(":");
// var pgClick = p[0];
// var attrName = p[1];
// var attrAction = p[2];
var s = s_gi(s_account);
s.linkTrackVars = "prop2,prop4,prop26";
s.linkTrackEvents = "";
s.events = "";
s.prop26 = clickType;
s.prop2 = busName;
//parse out first category from string list of categories
var a = busCategory.split(",");
s.prop4 = a[0];
s.tl(this,"o","Switchboard");
//reset vars to avoid double counting if superpages tracks the clickthru
s.linkTrackVars = "None";
s.linkTrackEvents = "None";
s.events = "";
s.eVar17 = "";
s.prop26 = "";
s.eVar7 = "";
s.prop2 = "";
s.eVar5 = "";
s.prop4 = "";
}
function clickTrackCityGuide(type,city,style){
//Cityguide type
// Atlanta / Boston /
// Atlanta:Kid Friendly / Boston:Cheap Eats
var s = s_gi(s_account);
s.linkTrackVars = "prop35";
s.events = "";
s.linkTrackEvents = "";
if (type=='i') {
s.prop35 = "RCG Index:" + city;
}
else if (type=='x')
{
s.prop35 = "RCG:"+city+":"+style;
}
else
{
s.prop35 = "RCG:"+city+":"+style;
}
s.tl(this,"o","Switchboard");
}
function clickTrackCityGuideBusiness(type){
//Cityguide Busihness type
var s = s_gi(s_account);
s.linkTrackVars = "eVar30,events";
s.linkTrackEvents = "event12";
s.events="event12";
s.eVar30 = "RCG:" + type;
s.tl(this,"o","Switchboard");
}
function clickTrackCityGuideMoreInfo(city,style){
var s = s_gi(s_account);
s.linkTrackVars = "eVar30,prop35,events";
s.events = "event12";
s.linkTrackEvents = "event12";
s.eVar30 = "RCG:" + style;
s.prop35 = "RCG:"+city+":"+style;
s.tl(this,"o","Switchboard");
}
