(function() { function bxBootstrap() { var re = /bot|crawl|slurp|spider|mediapartners|headlesschrome|snap-prefetch|remotasks|woorank|uptime\.com|facebookexternalhit|facebookcatalog/i; if (re.test(navigator.userAgent) || navigator.userAgent == '') { return; } if (!(window.bouncex&&bouncex.website)) { var pushedData = []; if(window.bouncex && bouncex.push && bouncex.length){ pushedData = bouncex; } window.bouncex = {}; bouncex.pushedData = pushedData; bouncex.website = {"id":7844,"name":"Hertz","cookie_name":"bounceClientVisit7844","domain":"hertz.comrentacarreservation","ct":"fp_local_storage","ally":0,"ei":0,"tcjs":"","cjs":"","force_https":false,"waypoints":false,"content_width":900,"gai":"","swids":"","sd":0,"ljq":"auto","campaign_id":0,"is_preview":false,"aco":{"first_party_limit":"3500","local_storage":"1"},"cmp":{"gdpr":0,"gmp":0,"whitelist_check":0},"burls":[],"ple":false,"fbe":true,"ffs":"DISABLE_TCFAPI_COMPLIANCE, GPP_COMPLIANCE_DISABLED","mas":2,"map":1,"gar":true,"ete":1,"ettm":false,"etjs":"/* ---------------------------- SHARED VARIABLES ---------------------------- */\n\nvar HERTZ_PARAMS = ['CDP','age','ddate','did','pCountryCode','pdate','pid','rateQuoteIds','sippCode','travelType', 'vehicles', 'itinerary', 'review-and-book', 'resetSipp'],\n HERTZ_URL = bouncex.utils.url.allowParams(HERTZ_PARAMS),\n CLEAN_URL = bouncex.utils.url.allowParams(),\n ATC_ID_SELECTOR = '#checkout-summary h6:contains(\"or similar\"), .rd-vehicle .rd-info-left strong:contains(\"or similar\"), #checkout-vehicle-description h6:contains(\"or similar\")';\n\n/* --------------------------------- HELPERS -------------------------------- */\n\nfunction slugify(copy) {\n copy = copy || '';\n return copy.replace(/\\s/g, '_').toLowerCase();\n}\n\n/* ------------------------------ ITEM TRACKING ----------------------------- */\n\nfunction isExcludedCompactCars(copy, subcopy) {\n return copy.indexOf('Compact') > -1 || subcopy.indexOf('Small Sedan') > -1;\n}\n\nfunction getItem($item) {\n var copy = $item.find('[id*=\"-make_model\"]').text().trim(),\n src = $item.find('img[id*=\"-vehicle_image\"]').attr('src') || '',\n imageurl = '',\n subcopy = $item.find('[id*=\"-vehicle_type\"]').text().trim(),\n price = $item.find('.vehicle-total-pricing:contains(\"est. total\")').text().replace(/[^0-9]/g, '');\n\n if (src) {\n imageurl = bouncex.utils.getOrigin() + src;\n }\n\n return {\n id: slugify(copy),\n copy: copy,\n subcopy: subcopy,\n imageurl: imageurl,\n instock: true,\n price: price,\n excluded: isExcludedCompactCars(copy, subcopy)\n };\n}\n\nfunction getLoggedInItem($item) {\n var carId = $item.attr('data-sipp'),\n copy = $item.find('.gtm-vehicle-header .gtm-vehicle-desc .gtm-vehicle-type').first().text().replace(/\\(.*?\\)/g,'').trim(),\n imageurl = '',\n subcopy = $item.find('h2.gtm-vehicle-title').first().text().trim(),\n price = $item.find('.gtm-vehicle-pricing .gtm-paynow .gtm-price').text().replace(/[^0-9]/g, '');\n\n if (carId) {\n imageurl = `${bouncex.utils.getOrigin()}/content/dam/hertz/us/vehicles/${carId}.rendition.vlarge.png`;\n }\n\n return {\n id: slugify(copy),\n copy: copy,\n subcopy: subcopy,\n imageurl: imageurl,\n instock: true,\n price: price,\n excluded: isExcludedCompactCars(copy, subcopy)\n };\n}\n\nfunction getDataLayerItems() {\n var event = dataLayer.filter(e => e.event === 'raw_view_item_list'),\n items = !!event && !!event[0] && !!event[0].raw && !!event[0].raw.ecommerce && !!event[0].raw.ecommerce.impressions && event[0].raw.ecommerce.impressions;\n return items;\n}\n\nfunction getDataLayerItem($item) {\n var item = $item[0],\n { id, name, category, price } = item,\n copy = `${name.replace(/\\(.*?\\)/g,'').trim()} or similar`,\n imageurl;\n\n return {\n id: slugify(copy),\n copy: copy,\n subcopy: category || 'Vehicle',\n imageurl: id ? `${bouncex.utils.getOrigin()}/content/dam/hertz/us/vehicles/${id}.rendition.vlarge.png` : '',\n instock: true,\n price: price,\n excluded: isExcludedCompactCars(copy, category)\n };\n}\n\n// some item:imageurl(s) are lazy loaded, so we don't want to add those on page load.\n// some item:subcopy are blank because there are \"manager specials\" item grids\nfunction isValidItem(item) {\n item = item || {};\n\n return !!item.id && !!item.copy && !!item.imageurl;\n}\n\nfunction getItems() {\n var $logInEls = jQuery('#gtm-vehicle-grid .vehicle'),\n $logOutEls = jQuery('.MuiGrid-item'),\n dataLayerItems = getDataLayerItems(),\n $items = dataLayerItems.length > 0 ? dataLayerItems : $logInEls.length > 0 ? $logInEls : $logOutEls,\n getFunc = dataLayerItems.length > 0 ? getDataLayerItem : $logInEls.length > 0 ? getLoggedInItem : getItem,\n items = [],\n i = 0;\n\n for (i; i < $items.length; i++) {\n var item = getFunc(jQuery($items[i]));\n if (isValidItem(item)) {\n items[items.length] = item;\n }\n }\n\n return items;\n}\n\nfunction getItemIds(items) {\n var ids = [],\n i = 0;\n\n items = items || getItems();\n\n for (i; i < items.length; i++) {\n var item = items[i].id;\n if (!item) {\n continue;\n }\n ids[ids.length] = item;\n }\n\n return ids.join(',');\n}\n\n/* ------------------------------- CART EVENTS ------------------------------ */\n\nfunction emptyCart() {\n bouncex.et.onVarChange('cart_qty', function (oldVal, newVal) {\n if (bouncex.vars.cart && newVal === 0 && oldVal > 0) {\n bouncex.push(['empty_cart']);\n bouncex.setVar('cart', false);\n }\n });\n}\n\nfunction replenish(cart) {\n var url = cart.url;\n window.location.href = url + '#bx_replen=true';\n}\n\nfunction inCartReplen() {\n\treturn window.location.href.indexOf('bx_cart') > -1;\n}\n\nfunction reportReplenishment(cart) {\n\tif(inCartReplen()) {\n\t\tbouncex.push(['cart replenish attempt', {\n\t\t\t'cart:count': 0,\n\t\t\t'cart:replentype': 'ajax',\n\t\t}]);\n\t}\n\n\tif (bouncex.website.pts === 'checkout') {\n\t\tvar bxReplen = bouncex.utils.url.getParam('bx_replen'),\n\t\t\titemInCart = getReservationItemId();\n\n\t\tif(bxReplen && itemInCart) {\n\t\t\tbouncex.push(['cart replenish', {\n\t\t\t\t'cart:success': true,\n\t\t\t\t'cart:count': 1\n\t\t\t}]);\n\t\t}\n\t}\n}\n\nfunction initializeCartEvents() {\n bouncex.et.cart.init({\n replenish: replenish,\n replenishmentType: 'ajax',\n reportReplenishment: reportReplenishment,\n });\n\n emptyCart();\n}\n\n/* ------------------------------ USER TRACKING ----------------------------- */\n\nfunction getEmailHash(){\n var dl = window.dataLayer;\n var ev = dl && typeof dl.findLast === 'function' && dl.findLast(function(e) {\n return e && e.event === 'raw_memHashedEm';\n });\n return (ev && ev.raw && ev.raw.hashed_email) || '';\n}\n\nfunction trackEmailHash() {\n var emailID;\n if (!!bouncex.vars.logged_in_identified) {\n return;\n }\n\n emailID = getEmailHash();\n if (!!emailID) {\n bouncex.push([\n \"user\",\n {\n emailHash: emailID,\n source: \"LoggedIn\",\n },\n ]);\n bouncex.setVar(\"logged_in_identified\", true);\n }\n\n return;\n}\n\nfunction initializeUserTracking() {\n var userEmail;\n\n bouncex.et.onTrue(\n function () {\n if (!bouncex.vars.logged_in || !!bouncex.vars.logged_in_identified) {\n return;\n }\n userEmail = jQuery('.section-row .txt-normal-cont:contains(\"Email\") .email-wrap, .current-email #email-address-original').text().trim() || jQuery('#checkout-member-personal-details p.MuiTypography-root').last().text().trim();\n return bouncex.utils.validate.email(userEmail);\n },\n function () {\n bouncex.push([\n 'user',\n {\n 'email': userEmail,\n 'source': 'LoggedIn'\n }\n ]);\n\n bouncex.setVar('logged_in_identified', true);\n },\n 20\n );\n}\n\n/* ------------------------------ CUSTOM USER TRACKING ----------------------------- */\n\nfunction initializeCustomFieldMapping() {\n var $inputs = jQuery('input'),\n version = bouncex.vars.hertz_site_version;\n\n if (version === 'OLD') {\n bouncex.et.onVisible('input', function(){\n bouncex.off($inputs, 'blur.bxusercustomerevent');\n bouncex.on($inputs, 'blur.bxusercustomerevent', function(){\n var $el = jQuery(this),\n id = $el.attr('id') || '',\n val = $el.val() || $el.text();\n \n bouncex.log('input changes: ', val);\n if (bouncex.utils.validate.email(val)) {\n bouncex.push([\n 'user',\n {\n 'email': val,\n 'source': 'input',\n 'input_id': id\n }\n ]);\n }\n });\n });\n }\n}\n\n/* --------------------------- RESERVATION LOGIC -------------------------- */\n\n// removes item url smart tag validation. Emails drive user back to reservation\n// page. Vehicle PDP's do not exists.\nfunction setItemTrackingRequirements() {\n var requirements = bouncex.et.item.requirements || [],\n excludedReqs = ['url'],\n newReqs = [],\n i = 0;\n\n for (i; i < requirements.length; i++) {\n if (excludedReqs.indexOf(requirements[i].name) > - 1) {\n continue;\n }\n newReqs[newReqs.length] = requirements[i];\n }\n\n bouncex.et.item.requirements = newReqs;\n}\n\nfunction makeReservationEvent(ids) {\n var pickupParam = bouncex.utils.url.getParam('pdate', HERTZ_URL),\n localPickup = localStorage.getItem('PICK_UP_DATE'),\n pickupDate = pickupParam ? new Date(pickupParam) : new Date(localPickup),\n timestamp = pickupDate.getTime(),\n event = {\n 'pickup:date': pickupDate,\n 'page:url': HERTZ_URL,\n 'items:ids': ids,\n 'item:id': ids,\n 'cart:url': HERTZ_URL,\n 'cart:pickuptimestamp': timestamp\n };\n\n return event;\n}\n\nfunction isValidReservationEvents(resEvent) {\n resEvent = resEvent || {};\n\n return !!resEvent['items:ids'] && !!resEvent['page:url'] &&\n !!resEvent['pickup:date'];\n}\n\nfunction initializeReservationEvents() {\n var items,\n ids,\n event,\n i = 0;\n\n bouncex.et.onVisible('#gtm-vehicle-grid .vehicle, .MuiGrid-item', function() {\n bouncex.log('visible search items, waiting 1 second');\n bouncex.setTimeout2(function(){\n items = getItems();\n ids = getItemIds(items);\n event = makeReservationEvent(ids);\n\n setItemTrackingRequirements();\n\n for (i; i < items.length; i++) {\n var item = items[i];\n if (!isValidItem(item)) {\n continue;\n }\n bouncex.push(['item', item]);\n }\n\n if (!isValidReservationEvents(event)) {\n bouncex.log('view search - isValidReservationEvents logic failed');\n bouncex.push(['view search', event]);\n return;\n }\n\n bouncex.setVar('fired_search_event', true);\n bouncex.push(['view search', event]);\n }, 1000);\n });\n\n bouncex.setTimeout2(function(){\n if (!bouncex.vars.fired_search_event) {\n bouncex.log('view search - event failed to fire; firing empty event');\n bouncex.push(['view search', {}]);\n }\n }, 3000);\n}\n\nfunction getReservationItemId() {\n console.log(\"item id console :\",jQuery(ATC_ID_SELECTOR).first().text().replace(/\\(.*?\\)/g,'').replace(' ', ' ').trim());\n return slugify(jQuery(ATC_ID_SELECTOR).first().text().replace(/\\(.*?\\)/g,'').replace(' ', ' ').trim());\n}\n\nfunction initializeSessionTracking() {\n // Sometimes Hertz will display a modal that indicates \"Oops! Your Session Timed-Out ...\"\n // We should indicate that the user flow was canceled\n // Users are generally brought back to the search page\n bouncex.et.onVisible('[role=\"presentation\"] h3:contains(\"Oops! Your Session Timed-Out ...\")', function() {\n bouncex.push([\n 'session timeout',\n {}\n ]);\n });\n}\nfunction initializeBrowseEvents() {\n bouncex.push([\n 'view browse',\n {\n 'page:url': CLEAN_URL\n }\n ]);\n}\n\nfunction initializeAddToCart() {\n // itemId of single reservation\n var itemId,\n event;\n\n bouncex.et.onVisible(ATC_ID_SELECTOR, function() {\n bouncex.log('visible atc item');\n itemId = getReservationItemId();\n event = makeReservationEvent(itemId);\n\n if (!isValidReservationEvents(event)) {\n bouncex.log('add to cart - isValidReservationEvents logic failed');\n return;\n }\n \n if(itemId){\n bouncex.push(['add to cart', event]);\n bouncex.setv('cart', true);\n }\n });\n}\n\n/* --------------------------- INCENTIVIZED SERIES TRACKING -------------------------- */\n\nfunction getSessionData() {\n if (window.dlHelper && window.dlHelper.get) {\n var cdpCode = dlHelper.get('cdpCode') || '',\n pcCode = dlHelper.get('pcCode') || '',\n id = '68107',\n LinkType = 'HZLK',\n TargetType = 'Vehicle',\n PULoc = dlHelper.get('pickupOAGCode'),\n DOLoc = dlHelper.get('dropoffOAGCode'), \n DODate = (dlHelper.get('dropoffDate_yyyy-mm-dd') || '').replaceAll('-', ''),\n PUDate = (dlHelper.get('pickupDate_yyyy-mm-dd') || '').replaceAll('-', ''),\n PUTimeFormatted = (dlHelper.get('pickupTime24HR') || '').replaceAll(':', ''),\n DOTimeFormatted = (dlHelper.get('dropoffTime24HR') || '').replaceAll(':', ''),\n PUTime = PUTimeFormatted.length === 4 ? PUTimeFormatted : `0${PUTimeFormatted}`,\n DOTime = DOTimeFormatted.length === 4 ? DOTimeFormatted : `0${DOTimeFormatted}`,\n DOName = dlHelper.get('dropoffLocationName'),\n PUName = dlHelper.get('pickupLocationName'),\n DOAirportName = formatAirportString(DOName),\n PUAirportName = formatAirportString(PUName),\n DODateExtended = formatDateTime(dlHelper.get('dropoffDate_yyyy-mm-dd')),\n PUDateExtended = formatDateTime(dlHelper.get('pickupDate_yyyy-mm-dd')),\n incentivizedCpn = '211492',\n incentivizedLink = 'https://link.hertz.com/link.html?id=' + id + '&LinkType=' + LinkType + '&TargetType=' + TargetType + '&PULoc=' + PULoc + '&DOLoc=' + DOLoc + '&DODate=' + DODate + '&PUDate=' + PUDate + '&PUTime=' + PUTime + '&DOTime=' + DOTime + '&PC=' + incentivizedCpn,\n reservationLink = 'https://link.hertz.com/link.html?id=' + id + '&LinkType=' + LinkType + '&TargetType=' + TargetType + '&PULoc=' + PULoc + '&DOLoc=' + DOLoc + '&DODate=' + DODate + '&PUDate=' + PUDate + '&PUTime=' + PUTime + '&DOTime=' + DOTime + '&PC=';\n\n return { cdpCode, pcCode, PUAirportName, DODateExtended, PUDateExtended, incentivizedLink, reservationLink };\n }\n}\n\nfunction initializeIncentivizedCheck() {\n var ignoreCDP = ['2278478', '2275776', '1392782'],\n sessionData = getSessionData(),\n cdpCode = sessionData.cdpCode,\n pcCode = sessionData.pcCode,\n // check the URL and sessionData for cdp and pc codes\n firstCondition = HERTZ_URL.indexOf('PC') === -1 && HERTZ_URL.indexOf('CDP') === -1 || pcCode === '' && cdpCode === '',\n secondCondition = HERTZ_URL.indexOf('PC') === -1 && ignoreCDP.indexOf(bouncex.utils.url.getParam('CDP')) > -1 || pcCode === '' && ignoreCDP.indexOf(cdpCode) > -1;\n\n if (firstCondition || secondCondition) {\n bouncex.push(['incentivised_reservation', {\n\t\t\t'link': sessionData.incentivizedLink,\n 'pickuplocation': sessionData.PUAirportName,\n 'pickupdate': sessionData.PUDateExtended,\n 'dropoffdate': sessionData.DODateExtended\n\t\t}]);\n } else {\n bouncex.push(['non_incentivised_reservation', {\n\t\t\t'link': sessionData.reservationLink,\n 'pickuplocation': sessionData.PUAirportName,\n 'pickupdate': sessionData.PUDateExtended,\n 'dropoffdate': sessionData.DODateExtended\n\t\t}]);\n }\n}\n\nfunction initializeCdpCode(){\n var ignoreCDP = ['2278478', '2275776', '1392782'];\n if(dlHelper.get('cdpCode') && ignoreCDP.indexOf(dlHelper.get('cdpCode')) > -1) {\n return;\n }\n \n if(dlHelper.get('cdpCode')) {\n bouncex.push(['cdpCode', {'cdpCode': dlHelper.get('cdpCode')}]); \n }\n}\n\nfunction formatAirportString(str='') {\n // before: Indianapolis - Indianapolis International Airport (ind)\n // after: Indianapolis International Airport\n return str.split('-').pop().replace(/\\(.*?\\)/g,'').trim();\n}\n\nfunction formatDateTime(date='') {\n // result: Sun, Sep 08, 2025\n var fullDateObj = new Date(date),\n dayNum = fullDateObj.getDay(),\n monthNum = fullDateObj.getMonth(),\n dateNum = fullDateObj.getDate(),\n fullYear = fullDateObj.getFullYear(),\n fDay = dayObj[dayNum],\n fMonth = monthObj[monthNum],\n fDate = dateObj[dateNum];\n return `${fDay}, ${fMonth} ${fDate}, ${fullYear}`;\n}\n\nvar dayObj = {\n 0: 'Mon',\n 1: 'Tue',\n 2: 'Wed',\n 3: 'Thur',\n 4: 'Fri',\n 5: 'Sat',\n 6: 'Sun'\n};\n\nvar monthObj = {\n 0: 'Jan',\n 1: 'Feb',\n 2: 'Mar',\n 3: 'Apr',\n 4: 'May',\n 5: 'Jun',\n 6: 'Jul',\n 7: 'Aug',\n 8: 'Sep',\n 9: 'Oct',\n 10: 'Nov',\n 11: 'Dec'\n};\n\nvar dateObj = {\n 0: '01',\n 1: '02',\n 2: '03',\n 3: '04',\n 4: '05',\n 5: '06',\n 6: '07',\n 7: '08',\n 8: '09',\n 9: '10',\n 10: '11',\n 11: '12',\n 12: '13',\n 13: '14',\n 14: '15',\n 15: '16',\n 16: '17',\n 17: '18',\n 18: '19',\n 19: '20',\n 20: '21',\n 21: '22',\n 22: '23',\n 23: '24',\n 24: '25',\n 25: '26',\n 26: '27',\n 27: '28',\n 28: '29',\n 29: '30',\n 30: '31'\n};\n\n\n/* --------------------------- LOYALTY ENROLLMENT TRACKING -------------------------- */\n\nfunction initializeEnrollmentTracking() {\n if (bouncex.website.pts === 'signup'){\n bouncex.push(['view enrollment']);\n \n bouncex.et.onVisible('h3 + [class*=\"emotion-cache-no-speedy\"]:contains(\"You’re now a Hertz Gold Plus Rewards member\")', function(){\n \t\tbouncex.push(['goldplus_signup']);\n \t});\n }\n}\n\n/* --------------------------- AAA BOOKING TRACKING -------------------------- */\n\nfunction initializeAAABooking() {\n var AAACdpCodes = ['1805452','115','1857181','101','1857151','7','32','34','127','133','142','157','161','166','262','263','17062','1857155','171','10994','164','1857187','2','1857152','111','112','1857179','195','197','201','203','1857191','20','1857158','6','85299','1857154','154','33','92','95','116','117','118','126','128','132','135','151','154','155','158','162','169','172','178','179','182','183','189','193','194','198','205','206','215','216','220','221','229','230','231','257','264','265','266','267','268','269','11540','225091','1857192','18','1857157','1','460878','1303087','1462401','8888888','23','1857159','80','108','1857174','1805452','1975159','68965','1857164','9','10','37','76','77','78','196','212','213','234','235','259','97107','225088','1218830','1857195','57','1857166','28','30','49','51','54','61','1857165','3','22','35','63','64','11845','166450','1857167','66','103','271','1857168','69','11474','1857169','72','1857173','97','100','109','1857177','113','1857180','75','1823630','1857172','186','222','237','1857196','188','1857190','227','8','24','39','42','42','44','46','74','74','240','294','319','320','321','325','608','270841','1857161','1857161','1857199','5','255','225087','1359840','1857153','36','70','256','1857160','93','104','1857178','119','122','123','125','129','130','138','139','140','143','144','145','146','148','150','153','163','165','167','168','173','342618','1857182','175','176','1857188','19','177','41','45','1857162','219','1857194','217','160','1857186','241','1857200','71','1857170','83','180','184','199','204','238','1857198','247','250','252','274','322','323','324','326','10918','10919','80980','270840','258','260','261','1857204','31','82','84','86','98','102','105','106','107','1857176','270','225090','1857163','12','13','14','17','243','245','11210','225089','268259','1571971','1857156','4','172307','225292','271068','137','1857184','3068965','3000240','3000005','3000212','3000252','3368965','3300240','3000215','3300005','3111845','3300212','3000014','3000036','3000260','3000177','3300252','3000111','3000084','3300215','3000018','3000006','3311845','3300014','3000130','3300036','3000258','3300177','3300111','3300260','3000101','3000020','3000072','1744133','3300130','3000023','3000071','3000057','3300084','3000049','3300006','3805451','3000080','3000097','3000270','3000195','3000104','3300258','3300018','3000238','1434513','3300020','1723862','3300101','3805452','10489','3300072','3300023','3300238','3000069','3300057','3300270','3300071','3000188','3300049','3000115','3000222','74155','3300080','3300195','1563584','83438','3000001','3300104','3000219','3300188','100422','1107213','74269','36463','3300222','3300115','3000002','3300069','3000066','1079859','3300176','1137066','3300219','1159505','3000045','3300007','3000007','191336','3000160','2141003','3000075','3000176','3300160','3000083','3300045','1407511','3110489','3300002','3000113','2140805','191334','3300066','3000241','230631','3300113','1826703','1386403','3000074','304','3300001','1891305','2141001','3300097','3300074','3300075','343457','1563585','2140804','1874988','2141002','2141000','3300083','2145488','1780251','2160815','3000164','3000137','1458746','3015772','2140799','2140803','1357582','1974498','2261636','1563586','3300243','3300164','2087427','1656382','488791','1568849','1960362','2140798','2087660','15030'];\n \n \n \n \n \nfunction pushAAAEvent(inputSelector) {\n const inputCdp = jQuery(inputSelector).val();\n const CdpMatch = AAACdpCodes.includes(inputCdp);\n bouncex.log(\"cdp code is\", inputCdp);\n \n if (CdpMatch) {\n bouncex.push(['aaa_browse_abandonment', \n \t{\n \t 'cdp_code': inputCdp\n \t}\n ]);\n \n \n \n \n }\n}\n\n\nif (bouncex.website.pts === 'aaa_offers') {\n \n jQuery(document).off('click.bx.cdpOffers').on('click.bx.cdpOffers','input[name=\"aaa_cdp\"] + button.primary',function () {\n setTimeout(function () {\n pushAAAEvent('#cdp-textfield');\n },3000)\n }\n );\n}\n\n\nif (bouncex.website.pts === 'browse') {\n bouncex.et.onVisible('#new-discount-modal-container', function () {\n \n jQuery(document).off('click.bx.cdpBrowse').on('click.bx.cdpBrowse','#new-apply-button, .new-cancel-button',function () {\n pushAAAEvent('#cdp-textfield');\n }\n );\n });\n}\n\n \n} \n\n\nfunction initializeMemberLoginStatus(){\n \n\n bouncex.et.onTrue(\n function () {\n if (!bouncex.vars.logged_in || !!bouncex.vars.is_member) {\n return;\n }\n \n for (let i = 0; i < dataLayer.length; i++) {\n var item = dataLayer[i];\n if (item.event === \"raw_virtualPageview\") {\n var isMember = !!item.raw && !!item.raw.memberID && item.raw.memberID.length > 0;\n return isMember; \n \n }\n \n }\n\n },\n function () {\n bouncex.push(['hertz_member']);\n bouncex.setVar('is_member', true);\n\n },\n 20\n );\n}\n \n\n\n\n\n\n/* --------------------------- INITIALIZE TRACKING -------------------------- */\n\nfunction isValidDomain() {\n return CLEAN_URL.indexOf('www.hertz.com') > -1;\n}\n\nfunction isEn() {\n var lang = bouncex.html.attr('lang') || '';\n return /^en/.test(lang);\n}\n\nfunction isCorrectCountry(){\n return bouncex.state.geo.country_code === 'US';\n}\n\nfunction isValidForTracking() {\n return isValidDomain() && isEn() && isCorrectCountry();\n}\n\nfunction init() {\n if (!isValidForTracking()) {\n bouncex.log('isValidForTracking logic failed');\n return;\n }\n\n initializeSessionTracking();\n initializeUserTracking();\n initializeCartEvents();\n initializeEnrollmentTracking();\n initializeAAABooking();\n initializeMemberLoginStatus();\n \n \n \n \n trackEmailHash();\n\n switch (bouncex.website.pts) {\n case 'browse':\n initializeBrowseEvents();\n break;\n case 'search':\n bouncex.log('search page');\n initializeReservationEvents();\n initializeIncentivizedCheck();\n initializeCdpCode();\n break;\n case 'checkout':\n bouncex.log('checkout page');\n initializeAddToCart();\n initializeCustomFieldMapping();\n break;\n case 'aaa_offers':\n bouncex.log('AAA Offers Page');\n break;\n default:\n break;\n }\n}\n\ninit();\n","dge":true,"bxidLoadFirst":false,"pie":true,"cme":true,"gbi_enabled":0,"bpush":false,"pt":{"aaa_offers":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"document.querySelectorAll('.page.aaaOffer').length > 0;"}]]},"ancillary":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"(function() {\n var url = bouncex.utils.url.allowParams(['itinerary', 'vehicles', 'extras', 'review-and-book']),\n ancillaryUrlv1 = 'https://www.hertz.com/us/en/book/ancillaries/coverage',\n ancillaryUrlv2 = 'https://www.hertz.com/us/en/book/ancillaries/extras';\n ancillaryUrlv3 = 'https://www.hertz.com/rentacar/reservation/#extras';\n return url === ancillaryUrlv1 || url === ancillaryUrlv2 || url === ancillaryUrlv3;\n})();\n"}]]},"browse":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"(function() {\n var url = bouncex.utils.url.allowParams(['itinerary', 'vehicles', 'extras', 'review-and-book']),\n browseUrlv1 = 'https://www.hertz.com/rentacar/reservation/',\n browseUrlv2 = 'https://www.hertz.com/rentacar/reservation/#itinerary';\n return url === browseUrlv1 || url === browseUrlv2;\n})();\n"}]]},"checkout":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"(function() {\n var url = bouncex.utils.url.allowParams(['itinerary', 'vehicles', 'extras', 'review-and-book']),\n checkoutUrlv1 = 'https://www.hertz.com/us/en/book/checkout',\n checkoutUrlv2 = 'https://www.hertz.com/rentacar/reservation/#review-and-book';\n return url === checkoutUrlv1 || url === checkoutUrlv2;\n})();\n"}]]},"search":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"(function() {\n var url = bouncex.utils.url.allowParams(['itinerary', 'vehicles', 'extras', 'review-and-book']),\n searchUrlv1 = 'https://www.hertz.com/us/en/book/vehicles',\n searchUrlv2 = 'https://www.hertz.com/rentacar/reservation/#vehicles';\n return url === searchUrlv1 || url === searchUrlv2;\n})();\n"}]]},"signup":{"testmode":false,"val":[[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/enrollment"}]]}},"els":{},"vars":[{"name":"logged_in","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"jQuery('#loggedInMember').length > 0 || !!bouncex.parseJSON(localStorage.getItem('member'), {memberId:''}).memberId;","trigger":"pageload"},{"name":"ever_logged_in","polling":"all","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"bouncex.vars.logged_in || null;","trigger":"pageload"},{"name":"cart_qty","polling":"none","persist":"visit","page_types":[],"testmode":false,"default":"0","code":"(function() {\n var page = bouncex.website.pts;\n\n if (page === 'browse' || page === 'search') {\n return 0;\n }\n\n return page === 'ancillary' || page === 'checkout' ? 1 : null;\n})();\n","trigger":"pageload"},{"name":"logged_in_identified","polling":"none","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"cart","polling":"none","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"submitted_onsite","polling":"all","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"jQuery('.success-msg:visible, .signup-confirmation:visible').text().trim().toLowerCase().indexOf('thanks for signing up!') > -1 || null;","trigger":"pageload"},{"name":"cookie_modal_visible","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"jQuery('.cc-window:not(.cc-invisible)').length > 0;","trigger":"pageload"},{"name":"fired_search_event","polling":"none","persist":"no","page_types":["search"],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"hertz_site_version","polling":"all","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"(function(){\n var event = dataLayer.find((item) => item.event === \"raw_virtualPageview\"),\n\t\tversion = event && event.raw && event.raw.systemID || null;\n\treturn version === 'vulcan' ? 'NEW' : version === 'IRAC' ? 'OLD' : version;\n})();","trigger":"pageload"},{"name":"page_type","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"bouncex.website.pts;","trigger":"pageload"},{"name":"is_member","polling":"none","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"}],"dgu":"pixel.cdnwidget.com","dgp":false,"ba":{"enabled":0,"fbte":0},"biu":"assets.bounceexchange.com","bau":"api.bounceexchange.com","beu":"events.bouncex.net","ibx":{"tjs":"","cjs":"","miw":0,"mibcx":1,"te":1,"cart_rep":{"get":"","set":""},"ulpj":{"sfmc_s":"espemailid"},"cus":"","miw_exclude":"","enabled":1},"etjson":null,"osre":true,"osru":"osr.bounceexchange.com/v1/osr/items","checkDfp":false,"gamNetwork":"","spa":1,"spatm":0,"preinit_cjs":"SinglePageApp.setCustomParams({\n currentPageIdentifier: function() {\n var HERTZ_PARAMS = ['CDP','age','ddate','did','pCountryCode','pdate','pid','rateQuoteIds','sippCode','travelType', 'vehicles', 'itinerary', 'review-and-book', 'resetSipp'];\n return bouncex.utils.gtmLookup('pageName') || bouncex.utils.url.allowParams(HERTZ_PARAMS);\n }\n});","crs":{"integrations":null,"pageCount":null},"mat":0,"math":0,"cpnu":"coupons.bounceexchange.com","dfpcms":0,"sms":{"optm":"","eventSharing":false,"shqId":"","enabled":0},"pde":true,"fmc":["US"],"fme":true,"fmx":"","uid2":true,"sdk":{"android":{"enabled":false,"enabledVersions":[],"eventModifications":null},"ios":{"enabled":false,"enabledVersions":[],"eventModifications":null}},"onsite":{"enabled":1},"ads":{"enabled":0},"pubs":{"enabled":0},"websdk":{"enabled":0,"devMode":0},"ga4_property_id":"340661424","ga4_measurement_id":"3028476861","tag_state_domain":"api.bounceexchange.com","tag_state_domain_enabled":false} ; bouncex.tag = 'tag3'; bouncex.$ = window.jQuery; bouncex.env = 'production'; bouncex.restrictedTlds = {"casl":{"ca":1},"gdpr":{"ad":1,"al":1,"at":1,"ax":1,"ba":1,"be":1,"bg":1,"by":1,"xn--90ais":1,"ch":1,"cy":1,"cz":1,"de":1,"dk":1,"ee":1,"es":1,"eu":1,"fi":1,"fo":1,"fr":1,"uk":1,"gb":1,"gg":1,"gi":1,"gr":1,"hr":1,"hu":1,"ie":1,"im":1,"is":1,"it":1,"je":1,"li":1,"lt":1,"lu":1,"lv":1,"mc":1,"md":1,"me":1,"mk":1,"xn--d1al":1,"mt":1,"nl":1,"no":1,"pl":1,"pt":1,"ro":1,"rs":1,"xn--90a3ac":1,"ru":1,"su":1,"xn--p1ai":1,"se":1,"si":1,"sj":1,"sk":1,"sm":1,"ua":1,"xn--j1amh":1,"va":1,"tr":1}}; bouncex.client = { supportsBrotli: 1 }; bouncex.assets = {"ads":"ba8ae19a5bf9548f3d50df1e54121805","creativesBaseStyles":"a53944a2","gpsAuction":"bbb80866120d17013073bb6d284cbd6b","inbox":"c5ffeacd3b77d074a53f2878c1332dc9","onsite":"c05f8c5551fa6b964660ad61916291c1","sms":"e39203556bab2366e56296ce42e974a7","websdk":"9c2817e65e803cb8c86d0410c88f20c1","website_campaigns_7844":"db469e9bc8b3bea684e591bafc8088fe"}; bouncex.push = function(pushData) { bouncex.pushedData.push(pushData); } var runtime = document.createElement('script'); runtime.setAttribute('src', '//assets.bounceexchange.com/assets/smart-tag/versioned/runtime_c81e76ee00d795b1eebf8d27949f8dc5.br.js'); runtime.setAttribute('async', 'async'); bouncex.initializeTag = function() { var script = document.createElement('script'); script.setAttribute('src', '//assets.bounceexchange.com/assets/smart-tag/versioned/main-v2_e017b4177b2cd559863faed730560d8f.br.js'); script.setAttribute('async', 'async'); document.body.appendChild(script); var deviceGraphScript = document.createElement('script'); deviceGraphScript.setAttribute('src', '//assets.bounceexchange.com/assets/smart-tag/versioned/cjs_min_c84323e2726f3e99b307ab7740c6434b.js'); deviceGraphScript.setAttribute('async', 'async'); var dgAttrs = [{"Key":"id","Value":"c.js"},{"Key":"async","Value":"true"},{"Key":"data-apikey","Value":"2^HIykD"},{"Key":"data-cb","Value":"bouncex.dg.initPostDeviceGraph"},{"Key":"data-bx","Value":"1"},{"Key":"data-gm","Value":"1"},{"Key":"data-fire","Value":"1"}]; if (dgAttrs) { for (var i = 0; i < dgAttrs.length; i++) { deviceGraphScript.setAttribute(dgAttrs[i].Key, dgAttrs[i].Value); } } document.body.appendChild(deviceGraphScript); bouncex.initializeTag = function() {}; }; runtime.onload = bouncex.initializeTag; document.body.appendChild(runtime); } } if (document.readyState === "loading") { document.addEventListener("DOMContentLoaded", bxBootstrap); } else { bxBootstrap(); }})();