Pronto.com – What’s Your Question?


Pronto.com – What’s Your Question? 0; } function isNavInfoAvailableInUnifiedPayload() { return !!ask.unified.payload.externalData && !!ask.unified.payload.externalData.navInfo; } function registerSendBackFillOnPageLoadComplete() { $(window).on(“load”, function(){ setTimeout(function(){ ask.unified.sendBackFill(); }, 0); }); } ask.unified.cancelPending = function (key) { var length = ask.unified.pending.length; for (var i = 0; i < length; i++) { if (ask.unified.pending[i] === key) { ask.unified.pending.splice(i, 1); break; } } }; ask.unified.apiHandler = function (success, responseText, cb) { if (cb) { cb(); } }; var _timedOut = false, _timeFromSerpStart = null, _adsLoggingTimeout = null, _dynamicLoggingTimeout = null, _dynamicBingJSLoggingTimeout = null; try { _timeFromSerpStart = ((new Date() - ask.CSA.startTime) - ask.CSA.showSerpStartTime); _adsLoggingTimeout = 5000 - _timeFromSerpStart; _dynamicLoggingTimeout = Math.max(_adsLoggingTimeout, 1); _dynamicBingJSLoggingTimeout = ask.BING.bingTimeout - 1000; } catch (e) { _dynamicLoggingTimeout = 2000; _dynamicBingJSLoggingTimeout = 3000; } function mixinCSAAdData(payload) { var externalData = { csaInfo: { domTime: ask.CSA.domReadyTime ? ask.CSA.domReadyTime : 0, adsResponseTime: ask.CSA.responseTime ? ask.CSA.responseTime : 0, adsShownTime: ask.CSA.adsShownTime ? ask.CSA.adsShownTime : 0, serpShownTime: ask.CSA.serpShownTime ? ask.CSA.serpShownTime : 0, supplement: _timedOut, serpTimedOut: !!ask.CSA.showSerpTimeoutFired, serpTimeoutStartTime: ask.CSA.showSerpStartTime ? ask.CSA.showSerpStartTime : 0, dynamicTimeout: _dynamicLoggingTimeout, viewportHeight: ask.CSA.viewportHeight ? ask.CSA.viewportHeight : 0, viewportWidth: ask.CSA.viewportWidth ? ask.CSA.viewportWidth : 0, adContentRatio: ask.CSA.adContentRatio ? ask.CSA.adContentRatio : 0, csaHeight: ask.CSA.csaHeight ? ask.CSA.csaHeight : 0, csaWidth: ask.CSA.csaWidth ? ask.CSA.csaWidth : 0, centerRailHeight: ask.CSA.centerRailHeight ? ask.CSA.centerRailHeight : 0, centerRailWidth: ask.CSA.centerRailWidth ? ask.CSA.centerRailWidth : 0, rightRailHeight: ask.CSA.rightRailHeight ? ask.CSA.rightRailHeight : 0, rightRailWidth: ask.CSA.rightRailWidth ? ask.CSA.rightRailWidth : 0 } }; var totalAds = 0, topCount = 0, midCount = 0, botCount = 0, topRSCount = 0, rightRSCount = 0, uniqueResultsDisplayed = 0, csaTopModule = "" || "csaTop", csaMiddleModule = "" || "csaMiddle", csaBottomModule = "" || "csaBottom", csaTopAdZone = "" || "" || "primary", csaMiddleAdZone = "" || "" || "primary", csaBottomAdZone = "" || "" || "primary", csaProviderSource = "" || "csa"; if(ask.CSA.adModules){ for(var i= 0; i 0) { ask.unified.addProvider("gsl", { zoneCenterResults: zoneCenterResults }); } if (zoneRightResults > 0) { ask.unified.addProvider(“gsl”, { zoneRightResults: zoneRightResults }); } if (zonePrimaryResults > 0) { ask.unified.addProvider(“gsl”, { zonePrimaryResults: zonePrimaryResults }); } ask.unified.addProvider(“gsl”, { responseTime: ask.CSA.responseTime ? ask.CSA.responseTime : 0, resultsDisplayed: totalAds, uniqueResultsDisplayed: uniqueResultsDisplayed }); if (ask.CSA.numTopRs !== null || ask.CSA.numRightRs !== null) { topRSCount = ask.CSA.numTopRs ? ask.CSA.numTopRs : 0; rightRSCount = ask.CSA.numRightRs ? ask.CSA.numRightRs : 0; let totalRS = topRSCount + rightRSCount; ask.unified.addProvider(“relatedSearch”, { responseTime: ask.CSA.responseTime ? ask.CSA.responseTime : 0, resultsDisplayed: totalRS, uniqueResultsDisplayed: totalRS, zoneCenterDisplayed: topRSCount, zoneRightDisplayed: rightRSCount }); let rsTemplate = {resultType: “relatedSearch”, providerSource: “relatedSearch”} ask.unified.addPresentation(“center”, “relatedSearchMid”, 1, rsTemplate, topRSCount); ask.unified.addPresentation(“right”, “relatedSearchRight”, 1, rsTemplate, rightRSCount); } try { mixinNavigationTimingInfo(externalData); ask.unified.payload.externalData = externalData; } catch (e) { } }; function mixinNavigationTimingInfo(eData) { var navInfo = getNavigationTimingInfo(window); if(navInfo) { eData[“csaInfo”].csaStartTime = (ask.CSA.startTime.getTime() – navInfo.navigationStart); } }; $(document).on(“unified:BackFill”, function (evt, data) { var ask = window.ask; if (data && data.payload) { ask.unified.addPresentationResult(data.payload); ask.unified.sendBackFill(); } }); if (“1” !== CookieUtil.getChipValue(“uc”, “nv”)) { return; } if (ask.afc) { ask.unified.addProvider(“gsl”, ask.afc.provider); ask.unified.addPresentation.apply(null, ask.afc.presentation.top); ask.unified.addPresentation.apply(null, ask.afc.presentation.bottom); ask.unified.sendBackFill(); } else if (!ask.unified.pending || ask.unified.pending.length == 0) { if(ask.unified.payload) { ask.unified.payload.suspectBackFill = true; } else { ask.unified.payload = { “suspectBackFill”: true }; } ask.unified.sendBackFill(); } else if (ask.CSA && typeof ask.CSA.addCSALoadCallback === “function”) { ask.CSA.addCSALoadCallback(function () { var payload = _timedOut ? { pl_supplement: true } : {}; if (typeof ask.CSA.calculateAdContentMetrics === “function”) { ask.CSA.calculateAdContentMetrics(); } mixinCSAAdData(payload); ask.unified.sendBackFill(); }, function () { _timedOut = true; if (ask.CSA && typeof ask.CSA.showSerp === “function”) { ask.CSA.showSerp(); } ask.unified.sendBackFill(); }, _dynamicLoggingTimeout); } else if (ask.BING && typeof ask.BING.addBINGLoadCallback === “function”) { ask.BING.addBINGLoadCallback(function () { ask.unified.payload = { pageResults: [], providers: ask.unified.pendingProviders || {} }; let resultTemplate = {resultType: “bingJSAds”, providerSource: “bingAds”} ask.unified.addPresentation(“center”, “bingAdsTop”, 1, resultTemplate, ask.BING.numTopAds); ask.unified.addPresentation(“center”, “bingAdsBottom”, 2, resultTemplate, ask.BING.numBottomAds); ask.unified.addPresentation(“right”, “bingAdsRight”, 3, resultTemplate, ask.BING.numRightAds); ask.unified.sendBackFill(); }, _dynamicBingJSLoggingTimeout); } } }); App.events.push({ partial: “partial-unified-footer”, contextSelector: document, elementSelector: “a”, type: “click”, handler: function(evt) { var ask = window.ask; var target = $(this); var unifiedData = target.data(“unified”); if(!unifiedData) { return; } var isImage = “img” === evt.target.tagName.toLowerCase(); var assetType = target.data(“unified-assettype”) || (isImage ? “image” : “primaryTextLink”); var destUrl = target.attr(“href”); var qoParam = target.data(“qo”); var appPayload = { actionType: “click”, assetType: assetType, text: $.trim(target.text()).replace(/s+/g, ” “), url: destUrl }; if(ask.unified.pageContext.metaInfo) { unifiedData.metaInfo = unifiedData.metaInfo || {}; unifiedData.metaInfo.client = ask.unified.pageContext.metaInfo.client || “”; unifiedData.metaInfo.clientChannel = ask.unified.pageContext.metaInfo.clientChannel || “”; unifiedData.metaInfo.styleId = ask.unified.pageContext.metaInfo.styleId || “”; } if(unifiedData.imagePresent) { unifiedData.metaInfo = unifiedData.metaInfo || {}; unifiedData.metaInfo.imagePresent = unifiedData.imagePresent; delete unifiedData.imagePresent; } $.extend(appPayload, unifiedData); var payload = {}; $.extend(payload, ask.unified.pageContext); if(ask.unified.pageContext.anuaapp) { $.extend(appPayload, JSON.parse(ask.unified.pageContext.anuaapp)); } var targetAttr = target.attr(“target”); var nonNav = assetType === “carouselClick” || assetType === “loadMore”; payload.anuaapp = JSON.stringify(appPayload); if(targetAttr || nonNav) { _UnifiedApi.logEvent(“Action”, payload, ask.unified.apiHandler); } else { var callback = ask.unified.apiHandler; if (destUrl) { callback = function (success, response) { ask.unified.apiHandler(success, response, function() { destUrl = _UnifiedApi.addURLParam(destUrl, “qo”, qoParam); document.location = destUrl; }); }; } _UnifiedApi.logEvent(“Action”, payload, callback); return false; } } }); })(); } ]]> -1) { cookieObj[tmpName.split(‘[‘)[0]] = cookieObj[tmpName.split(‘[‘)[0]] || {}; cookieObj[tmpName.split(‘[‘)[0]][tmpName.split(‘[‘)[1].replace(‘]’, ”)] = tmpVal; } else { cookieObj[tmpName] = tmpVal; } } } return cookieObj; }; function polling() { var cks = getDocumentCookies(); for (var i in cks) { var name = i; var value = cks[i]; if (name.indexOf(‘csaClick’) != -1 || name.indexOf(‘ypaClick’) != -1) { if (typeof fbq === “function”) { fbq(‘trackSingleCustom’, ‘1236983599798824’, ‘PaidClick’); var paidClickAd = (name.indexOf(‘csaClick’) != -1)? ‘PaidClickGoogle’:’PaidClickYahoo’; fbq(‘trackSingleCustom’, ‘1236983599798824’, paidClickAd); } document.cookie = name + ‘=; expires=Thu, 01 Jan 1970 00:00:01 GMT;’; } } setTimeout(function () { polling(); }, 25); } (function () { polling(); })(); ]]> ]]>

Source