{"version":3,"sources":["global/tracking.js"],"names":["callFloodlight","tagId","ModelName","ModelYear","floodLightSessionManager","catId","_satellite","console","setVar","track","$","document","ready","window","addEventListener","e"],"mappings":"YAIA,SAASA,gBAAeC,EAAOC,EAAWC,IAyZxC,QAAAC,0BAAAC,IA1PF,IAAAC,WAAA,CACAC,QAAKD,IAAAA,mKACHC,IAAAA,aACAC,OAAIF,aACFE,MAAAA,aACAC,WAAO,cA6BXC,EAAEC,UAAUC,MAAM,cAmQlBC,OAAOC,iBAAiB,eAAgB,SAAUC","file":"tracking.min.js","sourcesContent":["/*\r\n * Flood Light START\r\n * Sample: onclick=\"callFloodlight('view-warranty-booklet');\"\r\n */\r\nfunction callFloodlight(tagId, ModelName, ModelYear) {\r\n\r\n // var axel = Math.random() + \"\";\r\n // var a = axel * 10000000000000;\r\n\r\n // switch (tagId) {\r\n\r\n // // Program & Benefits: Fire when user clicks \"view warranty booklet\"\r\n // case \"view-warranty-booklet\":\r\n // //document.getElementById('FloodLightTags').innerHTML = '';\r\n // gtag('event', 'conversion', {\r\n // 'allow_custom_scripts': true,\r\n // 'send_to': 'DC-4114413/hrmhcpv/endtw0+standard'\r\n // });\r\n // break;\r\n\r\n // //Dealer Locator: Fire once a user submits zip code\r\n // case \"dealer-zip-submit\":\r\n // //document.getElementById('FloodLightTags').innerHTML = '';\r\n // gtag('event', 'conversion', {\r\n // 'allow_custom_scripts': true,\r\n // 'send_to': 'DC-4114413/hrmhcpv/endtd0+standard'\r\n // });\r\n // break;\r\n\r\n // //Vehicle Compare:Fire once a user hits \"ready to compare\" button\r\n // case \"ready-to-compare\":\r\n // // document.getElementById('FloodLightTags').innerHTML = '';\r\n // gtag('event', 'conversion', {\r\n // 'allow_custom_scripts': true,\r\n // 'send_to': 'DC-4114413/hrmhcpv/endmv0+standard'\r\n // });\r\n // break;\r\n\r\n // //Financial Calculator: Fire once a user clicks \"Find vehicles in my budget\" button\r\n // case \"find-vehicles-in-my-budget\":\r\n // //document.getElementById('FloodLightTags').innerHTML = '';\r\n // gtag('event', 'conversion', {\r\n // 'allow_custom_scripts': true,\r\n // 'session_id': floodLightSessionManagerValue(),\r\n // 'send_to': 'DC-4114413/hrmhcpv/endtf0+per_session'\r\n // });\r\n // break;\r\n\r\n // //Alert Created: Fire once someone submit/clicks \"create alert\"\r\n // case \"create-alert\":\r\n // // document.getElementById('FloodLightTags').innerHTML = '';\r\n // gtag('event', 'conversion', {\r\n // 'allow_custom_scripts': true,\r\n // 'send_to': 'DC-4114413/hrmhcpv/endta0+standard'\r\n // });\r\n // break;\r\n\r\n // //Dealer Email: - Fire once a user hits \"send\" on contact dealer/email\r\n // case \"contact-dealer\":\r\n // //document.getElementById('FloodLightTags').innerHTML = '';\r\n // gtag('event', 'conversion', {\r\n // 'allow_custom_scripts': true,\r\n // 'send_to': 'DC-4114413/hrmhcpv/endmd0+standard'\r\n // });\r\n // break;\r\n\r\n // //Dealer Chat: Fire once a user hits \"chat\" button\r\n // case \"dealer-chat\":\r\n // //document.getElementById('FloodLightTags').innerHTML = '';\r\n // gtag('event', 'conversion', {\r\n // 'allow_custom_scripts': true,\r\n // 'send_to': 'DC-4114413/hrmhcpv/endmd00+standard'\r\n // });\r\n // break;\r\n\r\n // // Removed : HCPVISSUES-754\r\n // //Dealer Call:Fire once a user hits \"call\" button\r\n // // case \"dealer-call\":\r\n // // // document.getElementById('FloodLightTags').innerHTML = '';\r\n // // gtag('event', 'conversion', {\r\n // // 'allow_custom_scripts': true,\r\n // // 'send_to': 'DC-4114413/hrmhcpv/endmd000+standard'\r\n // // });\r\n // // break;\r\n\r\n // //Customer Reviews: Fire when a shopper clicks \"read more\" or Edmunds logo \r\n // case \"customer-reviews\":\r\n // //document.getElementById('FloodLightTags').innerHTML = '';\r\n // gtag('event', 'conversion', {\r\n // 'allow_custom_scripts': true,\r\n // 'send_to': 'DC-4114413/hrmhcpv/endmc0+standard'\r\n // });\r\n // break;\r\n\r\n // //Inspection Report:Fire when a shopper clicks \"View free carfax report\"\r\n // case \"inspection-report\":\r\n // //document.getElementById('FloodLightTags').innerHTML = '';\r\n // gtag('event', 'conversion', {\r\n // 'allow_custom_scripts': true,\r\n // 'send_to': 'DC-4114413/hrmhcpv/endmi00+standard'\r\n // });\r\n // break;\r\n\r\n // //Inventory Search Results:\"Fire once user has searched and been provided listings for a model \r\n // //ModelName is required\r\n // //ModelYear is required\r\n // //**REMOVED HCPVISSUES-682*/\r\n // case \"inventory-search-results\":\r\n // // document.getElementById('FloodLightTags').innerHTML = '';\r\n // // gtag('event', 'conversion', {\r\n // // 'allow_custom_scripts': true,\r\n // // 'u1': ModelName,\r\n // // 'u2': ModelYear,\r\n // // 'send_to': 'DC-4114413/hrmhcpv/endti00+standard'\r\n // // });\r\n\r\n // gtag('event', 'conversion', {\r\n // 'allow_custom_scripts': true,\r\n // 'session_id': floodLightSessionManagerValue(),\r\n // 'u1': ModelName,\r\n // 'u2': ModelYear,\r\n // 'send_to': 'DC-4114413/hrmhcpv/endti00+per_session'\r\n // });\r\n\r\n // break;\r\n\r\n // //Inventory Search Results:\"Fire once user has searched and been provided listings for all models\r\n // case \"inventory-search-results-allmodels\":\r\n // document.getElementById('FloodLightTags').innerHTML = '';\r\n // break;\r\n\r\n // //Inventory Search Details:Fire once a user clicks on \"see details\", would like to fire on the page load but if unavailable would settle for click on \"see details button\"\r\n // //ModelName is required\r\n // //ModelYear is required\r\n // //***REMOVED HCPVISSUES-682 */\r\n // case \"inventory-search-details\": \r\n // //document.getElementById('FloodLightTags').innerHTML = '';\r\n // gtag('event', 'conversion', {\r\n // 'allow_custom_scripts': true,\r\n // 'u1': ModelName,\r\n // 'u2': ModelYear,\r\n // 'send_to': 'DC-4114413/hrmhcpv/endmi0+standard'\r\n // });\r\n // break;\r\n\r\n // // VDP: Add to contact a dealer under vehicle details\r\n // case \"vdp-contact-dealer\":\r\n // //document.getElementById('FloodLightTags').innerHTML = '';\r\n // gtag('event', 'conversion', {\r\n // 'allow_custom_scripts': true,\r\n // 'send_to': 'DC-4114413/hrmhcpv/endmd00+standard'\r\n // });\r\n // break;\r\n // }\r\n\r\n\r\n}\r\n/*\r\n * FloodLight END\r\n * \r\n */\r\n\r\n// Firefox 'Tracking Protection' prevents the satelliteLib from loading.\r\n// Extend this object with any function you would normally call on _satellite.\r\nif (!_satellite) {\r\n console.log(\"AdobeDTM satelliteLib tracker failed to load. You are probably running FireFox with 'Tracking Protection' enabled. Subsequent '_satellite' calls will be no-ops.\");\r\n var _satellite = {\r\n setVar: () => { },\r\n track: () => { },\r\n pageBottom: () => { },\r\n }\r\n}\r\n\r\n/**\r\n * \r\n * Adobe Launch START\r\n */\r\n\r\n //get the current page name\r\n // var sPath, sPageName;\r\n // sPath = window.location.pathname;\r\n // sPageName = sPath.substring(sPath.lastIndexOf('/') + 1);\r\n // if (sPageName == \"\"){\r\n // sPageName = \"MAIN\"\r\n // }\r\n // var _props = {\r\n // 'url' : 'https://www.hondacertified.com/',\r\n // 'sitelanguage' : 'ENGLISH',\r\n // 'pagepath' : window.location.href,\r\n // 's.prop47' : 'ENGLISH',\r\n // 'pageName' : sPageName\r\n // };\r\n\r\n/**\r\n * \r\n * Adobe Launch END\r\n */\r\n$(document).ready(function () {\r\n\r\n /*\r\n * DTM: digitalDataLayer Tracking start\r\n */\r\n\r\n\r\n\r\n // temp. data layer for: dtmDataLayerGlobal\r\n // var digitalDataLayer = {\r\n // sitelanguage: \"english\",\r\n // zipstatus: \"\", // check local storage\r\n // pageName: sPageName\r\n // }\r\n\r\n // //zipstatus: is there a zip?\r\n // var checkCurrentZipCode = localStorageGetItemCommon(\"_GeoCurrentZipCode\");\r\n\r\n // if (checkCurrentZipCode == null) {\r\n // // zip is NOT available\r\n // digitalDataLayer_update('zipstatus', 'no');\r\n // } else {\r\n // // zip is available\r\n // digitalDataLayer_update('zipstatus', 'yes');\r\n // }\r\n\r\n // // update dtmDataLayerGlobal with latest value\r\n // function digitalDataLayer_update(category, result) {\r\n // if (typeof digitalDataLayer !== 'undefined') {\r\n\r\n // //update category and results\r\n // digitalDataLayer[category] = result;\r\n // var dtmDataLayerGlobal = JSON.stringify(digitalDataLayer);\r\n\r\n // //append to the page\r\n // var scrpt = document.createElement(\"script\");\r\n // scrpt.type = \"text/javascript\";\r\n // scrpt.innerHTML = 'dtmDataLayerGlobal = ' + dtmDataLayerGlobal;\r\n // // console.log(scrpt);\r\n // document.getElementById(\"dtm-data-layer\").appendChild(scrpt);\r\n\r\n // debug && console.log(dtmDataLayerGlobal);\r\n // }\r\n\r\n\r\n // }\r\n\r\n /*\r\n * DTM: digitalDataLayer Tracking END\r\n */\r\n\r\n\r\n /*\r\n * Oracle Pixel Tags Start\r\n */\r\n\r\n\r\n\r\n // Function to check query string for a value\r\n // function getQueryStringValue(variable) {\r\n // var query = window.location.search.substring(1).toLowerCase();\r\n // var vars = query.split(\"&\");\r\n // for (var i = 0; i < vars.length; i++) {\r\n // var pair = vars[i].split(\"=\");\r\n // if (pair[0] == variable) {\r\n // return pair[1];\r\n // }\r\n // }\r\n // return (false);\r\n // }\r\n\r\n // get the value for model group name\r\n //lowercase value only\r\n // var _trackingPathname = getQueryStringValue('modelgroupname');\r\n\r\n\r\n // URLs that need Oracle tag + home page\r\n // lower case only\r\n // var _trackingOracleURL = [\r\n // 'accord%20sedan',\r\n // 'pilot',\r\n // 'cr-v',\r\n // 'civic%20sedan',\r\n // 'odyssey',\r\n // 'hr-v',\r\n // 'fit',\r\n // 'ridgeline',\r\n // 'civic%20Si%20sedan',\r\n // 'accord%2coupe',\r\n // 'crosstour',\r\n // 'civic%20coupe',\r\n // 'insight',\r\n // 'accord%20hybrid',\r\n // 'cr-z',\r\n // 'civic%20hybrid',\r\n // 'civic%20si%20coupe',\r\n // 'cr-v&year=2015'\r\n // ];\r\n\r\n\r\n\r\n // // check _trackingPathname matches anything from _trackingOracleURL\r\n // if ($.inArray(_trackingPathname, _trackingOracleURL) != -1 || window.location.pathname == '/') {\r\n\r\n // // if URL is matching, Fire the tag\r\n // getOracleTags();\r\n\r\n // };\r\n\r\n\r\n // function getOracleTags() {\r\n // var pixelUrl = 'https://h.nexac.com/e/mp/g-5291.xgi?pkey=5291';\r\n // var query = getParentUrl();\r\n\r\n // if (query != null && query.length > 0) {\r\n // var params = query.split(\"&\");\r\n // var gclid = null;\r\n // var gclsrc = null;\r\n // for (var i = 0; i < params.length; i++) {\r\n // var pos = params[i].indexOf(\"=\");\r\n // var name = params[i].substring(0, pos);\r\n // if (name == \"gclid\") {\r\n // gclid = params[i].substring(pos + 1);\r\n // } else if (name == \"gclsrc\") {\r\n // gclsrc = params[i].substring(pos + 1);\r\n // }\r\n // }\r\n // createPixel(pixelUrl, gclid, gclsrc);\r\n // }\r\n // }\r\n\r\n // function getParentUrl() {\r\n // var isInIframe = (parent !== window),\r\n // query = null;\r\n\r\n // if (isInIframe) {\r\n // if (document.referrer) {\r\n // query = document.referrer.split('?')[1];\r\n // }\r\n // } else {\r\n // query = document.location.search.substr(1);\r\n // }\r\n // return query;\r\n // }\r\n\r\n // function createPixel(pixelUrl, gclid, gclsrc) {\r\n\r\n // if (gclid != null || gclsrc != null) {\r\n // var img = document.createElement(\"img\");\r\n // var url = pixelUrl;\r\n // if (gclid != null) {\r\n // url = url + \"&chpth=\" + gclid;\r\n // }\r\n\r\n // if (gclsrc != null) {\r\n // url = url + \"&chpck=\" + gclsrc;\r\n // }\r\n\r\n // img.width = '1';\r\n // img.height = '1';\r\n // img.border = '0';\r\n // img.src = url;\r\n // var na_tag = document.getElementById(\"na_pixel\");\r\n // na_tag.appendChild(img);\r\n\r\n // }\r\n // }\r\n /*\r\n * Oracle Pixel Tags End\r\n */\r\n\r\n\r\n /*\r\n * Tracking - CampaignName start\r\n */\r\n // Function to check query string for a value - NOT LOWERCASE\r\n // function getQueryStringValueAny(variable) {\r\n // var query = window.location.search.substring(1);\r\n // var vars = query.split(\"&\");\r\n // for (var i = 0; i < vars.length; i++) {\r\n // var pair = vars[i].split(\"=\");\r\n // if (pair[0].toLowerCase() === variable.toLowerCase()) {\r\n // return pair[1];\r\n // }\r\n // }\r\n // return (false);\r\n // }\r\n // // get the value for CID\r\n // //lowercase value only\r\n // var _CampaignName = getQueryStringValueAny('cid');\r\n\r\n // if (_CampaignName) {\r\n\r\n // var inFiveMinutes = new Date(new Date().getTime() + 5 * 60 * 1000);\r\n // //set the cookie with the CID value\r\n // Cookies.set('_CampaignName', _CampaignName);\r\n\r\n // }\r\n\r\n /*\r\n * Tracking - CampaignName end\r\n */\r\n\r\n // document.ready END\r\n});\r\n\r\n/*\r\n * floodlight session manager start\r\n */\r\n\r\nfunction floodLightSessionManager(catId) {\r\n\r\n // var floodlightSessionValue = Cookies.get('floodlightSessionValue');\r\n // var randomValue = randomValueGenerator(16, '0123456789abcdefghijklmnopqrstuvwxyz');\r\n // if (floodlightSessionValue) {\r\n // //document.getElementById('FloodLightTags').innerHTML = '';\r\n // gtag('event', 'conversion', {\r\n // 'allow_custom_scripts': true,\r\n // 'session_id': floodlightSessionValue,\r\n // 'send_to': 'DC-4114413/hrmhcpv/' + catId + '+per_session'\r\n // });\r\n // } else {\r\n // Cookies.set('floodlightSessionValue', randomValue, {\r\n // //expire in 30 minutes\r\n // expires: 1 / 48\r\n // });\r\n // // document.getElementById('FloodLightTags').innerHTML = '';\r\n // gtag('event', 'conversion', {\r\n // 'allow_custom_scripts': true,\r\n // 'session_id': randomValue,\r\n // 'send_to': 'DC-4114413/hrmhcpv/' + catId + '+per_session'\r\n // });\r\n // }\r\n};\r\n\r\n//This funtion will return the session value\r\n// function floodLightSessionManagerValue() {\r\n\r\n// var floodlightSessionValue = Cookies.get('floodlightSessionValue');\r\n// var randomValue = randomValueGenerator(16, '0123456789abcdefghijklmnopqrstuvwxyz');\r\n// if (floodlightSessionValue) {\r\n// return floodlightSessionValue;\r\n// } else {\r\n// Cookies.set('floodlightSessionValue', randomValue, {\r\n// //expire in 30 minutes\r\n// expires: 1 / 48\r\n// });\r\n// return randomValue;\r\n\r\n// }\r\n// }; \r\n\r\n// function randomValueGenerator(length, chars) {\r\n// var result = '';\r\n// for (var i = length; i > 0; --i) result += chars[Math.round(Math.random() * (chars.length - 1))];\r\n// return result;\r\n// }\r\n\r\n//When user clicks away from the page, remove the cookie \"floodlightSessionValue\"\r\nwindow.addEventListener('beforeunload', function (e) {\r\n // Cancel the event as stated by the standard.\r\n // Remove the cookie\r\n // Cookies.remove('floodlightSessionValue'); \r\n \r\n //e.returnValue \"remove Cookie\"\r\n\r\n});\r\n\r\n /*\r\n * floodlight session manager end\r\n */\r\n\r\n\r\n"]}