(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":3250,"name":"CheapCaribbean","cookie_name":"bounceClientVisit3250","domain":"cheapcaribbean.com","ct":"bind_to_domain","ally":0,"ei":0,"tcjs":"","cjs":"/* enable.feature.DISABLE_IOS_ABSOLUTE */","force_https":false,"waypoints":false,"content_width":900,"gai":"UA-340630-1","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":"","mas":2,"map":1,"gar":true,"ete":1,"ettm":false,"etjs":"/* -------------------- ONBOARD MAY 2021 --------------- */\nvar MONTHS = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],\n CLEAN_URL = bouncex.utils.url.allowParams();\n\nif (window.location.hostname.indexOf('cheapcaribbean.com') > -1) {\n bouncex.setTimeout2(initTracking, 1500);\n}\n\nfunction initTracking() {\n if (CLEAN_URL.indexOf('book.cheapcaribbean.com/Availability') > -1 || bouncex.website.pts === 'product') {\n fireViewEvents();\n }\n\n if (CLEAN_URL.indexOf('book.cheapcaribbean.com/Booking/Cart/Summary') > -1 || CLEAN_URL.indexOf('/checkout/review') > -1) {\n fireCartEvents();\n }\n\n if (CLEAN_URL.indexOf('/HotelById') > -1) {\n initializeItemEvents();\n }\n\n if (bouncex.website.pts === 'category') {\n fireCategoryEvents();\n }\n}\n\n/* ---------- HELPER FUNCTIONS --------- */\nfunction formatDate(date) {\n date = date || '';\n\n var dateArr = date.split('/'),\n month = dateArr[0],\n day = dateArr[1],\n year = dateArr[2];\n\n return MONTHS[month - 1] + ' ' + day + ', ' + year;\n}\n\nfunction getDestination() {\n return bouncex.utils.gtmLookup('page.data.destination_name') || '';\n}\n\n// /* -------- SEARCH ABANDONMENT ---------*/\nfunction fireViewEvents() {\n var pageTitle = jQuery('title').text(),\n destination,\n locationText;\n\n // Search Abandonment\n if ((pageTitle.indexOf('Hotel Availability') > -1 || CLEAN_URL.indexOf('/avail/hotels') > -1) && CLEAN_URL.indexOf('/avail/flights/') === -1) {\n bouncex.et.onTrue(\n function () {\n locationText = jQuery('.hotel-avail-heading h1').text().split('Hotels in ')[1];\n destination = locationText ? locationText.split(',').shift() : getDestination();\n return destination;\n },\n function () {\n bouncex.push(['view_search', {\n 'destination': destination\n }]);\n bouncex.setv('destination', destination);\n },\n 15\n );\n }\n\n // Destination Abandonment\n if (pageTitle.indexOf('Flight Availability') > -1 || CLEAN_URL.indexOf('/avail/flights/') > -1 || CLEAN_URL.indexOf('/resorts/') > -1) {\n bouncex.et.onTrue(\n function () {\n destination = getDestination();\n return destination;\n },\n function () {\n if (destination) {\n bouncex.push(['view_destination', {\n 'destination': destination\n }]);\n }\n },\n 15\n );\n }\n}\n\n// /* -------- CATEGORY ABANDONMENT ---------*/\nfunction fireCategoryEvents() {\n var url = bouncex.utils.url.allowParams();\n bouncex.push([\n 'view_category',\n {\n 'page_title': jQuery('.root-breadcrumbs span:last, .onsale-title, .fw-bolder span').first().text(),\n 'url': url,\n 'isdealspage': url.indexOf('/deals') > -1 && url.indexOf('/deals/brand') === -1 && url.indexOf('/brand') === -1\n },\n ]);\n}\n\n// /* ------ CART ABANDONMENT -------*/\nfunction fireCartEvents() {\n var tripDatesArr = jQuery('.is-highlighted dd:eq(3)').text().split('-'),\n departureDate = tripDatesArr.length > 1 ? formatDate(tripDatesArr[0]) : formatDate(bouncex.utils.gtmLookup('page.data.departure_date')),\n arrivalDate = tripDatesArr.length > 1 ? formatDate(tripDatesArr[1]) : formatDate(bouncex.utils.gtmLookup('page.data.return_date')),\n arrivalLocation = jQuery('.mini-cart-header h2').text().trim().split('Your Trip to ').pop() || getDestination();\n\n if (departureDate && arrivalDate && arrivalLocation) {\n bouncex.push([\n 'view_checkout',\n {\n 'departure_date': departureDate,\n 'arrival_date': arrivalDate,\n 'arrival_location': arrivalLocation\n },\n ]);\n }\n}\n\n/* ------------------------------ ITEM TRACKING ----------------------------- */\n\nfunction getItem() {\n var pageData = bouncex.utils.gtmLookup('page.data') || {},\n itemId = pageData.hotel_id,\n location = jQuery('[data-tag=\"SDK.Infobox.Description\"]').first().text().replace(/\\n/g, ' ').trim();\n return {\n id: itemId,\n copy: pageData.hotel_name && location ? pageData.hotel_name + ' - ' + location : '',\n category: 'hotel',\n url: createHotelPageURL(itemId, pageData.deal_id),\n imageurl: jQuery('#thumbnail-gallary-modal img[src*=' + itemId + ']').first().attr('src'),\n instock: true\n };\n}\n\nfunction createHotelPageURL(hotelId, dealId) {\n if (!hotelId || !dealId) {\n return;\n }\n\n return CLEAN_URL + '?onsaleid=' + dealId + '&hotelcode=' + hotelId + '&remotesourcecode=TravelscapeHotel';\n}\n\nfunction initializeItemEvents() {\n var item;\n\n bouncex.et.onTrue(\n function () {\n item = getItem();\n return !!item.id &&\n !!item.copy &&\n !!item.category &&\n !!item.url &&\n !!item.imageurl;\n },\n function () {\n bouncex.push(['item', item]);\n bouncex.push(['view item', {\n 'item:id': item.id,\n 'item:itemgroupid': item.id\n }]);\n },\n 10\n );\n}","dge":true,"bxidLoadFirst":false,"pie":true,"cme":true,"gbi_enabled":0,"bpush":false,"pt":{"cart":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"bouncex.utils.gtmLookup('page.data.page_id') === 'Checkout_step1' || bouncex.utils.gtmLookup('page.data.page_id') === 'Avail/Flights';"}]]},"category":{"testmode":false,"val":[[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/destinations"},{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/deals"},{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/brand"}],[{"activation":"js","prop":"","prop2":"","prop3":"","val":"document.querySelectorAll('[rel=\"canonical\"][href=\"https://www.cheapcaribbean.com/\"]').length === 0;"}]]},"checkout":{"testmode":false,"val":[[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/Booking/"},{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/checkout"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"/Registration/Login"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"/ReservationDisplay"}]]},"home":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"document.querySelectorAll('[rel=\"canonical\"][href=\"https://www.cheapcaribbean.com/\"]').length > 0;"}]]},"product":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"bouncex.utils.gtmLookup('page.data.page_id') === 'HotelPage' || bouncex.utils.gtmLookup('page.data.page_id') === 'Hotel Profile';"},{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/avail/hotels"},{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/avail/flights/"}]]},"search":{"testmode":false,"val":[[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/Availability/"},{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/Search"},{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/availability/"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"/search/externalformpost.aspx"}]]}},"els":{"PDP_restool":".megaOnSale.ng-isolate-scope"},"vars":[{"name":"logged_in","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"jQuery('[id*=accessible-megamenu] .bg-user').length > 0;","trigger":"pageload"},{"name":"ever_logged_in","polling":"none","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"bouncex.vars.logged_in || null;","trigger":"pageload"},{"name":"cart_value","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"Number(bouncex.utils.gtmLookup('page.data.package_total_value') || 0);","trigger":"pageload"},{"name":"cart_qty","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"Number(bouncex.utils.gtmLookup('page.data.package_total_value') || 0) > 0 ? 1 : 0;","trigger":"pageload"},{"name":"submitted_onsite","polling":"all","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"jQuery('#FooterEmailConfirmation:visible').length > 0 || null;","trigger":"pageload"},{"name":"destination","polling":"none","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"static_code","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"(function () {\n var todaysDate = new Date(),\n currentMonth = todaysDate.getMonth(),\n currentYear = todaysDate.getFullYear();\n if (currentYear === 2022) {\n switch (currentMonth) {\n case 0:\n return 'WK100F';\n case 1:\n return 'WK100G';\n case 2:\n return 'WK100H';\n case 3:\n return 'WK100J';\n case 4:\n return 'WK100M';\n case 5:\n return 'WK100N';\n case 6:\n return 'WK100P';\n case 7:\n return 'WK100R';\n case 8:\n return 'WK100W';\n case 9:\n return 'WKA100';\n case 10:\n return 'WKB100';\n case 11:\n return 'WKC100';\n default:\n return '';\n }\n }\n if (currentYear === 2023) {\n switch (currentMonth) {\n case 0:\n return 'WKE100';\n case 1:\n return 'WKF100';\n case 2:\n return 'WKG100';\n case 3:\n return 'WKH100';\n case 4:\n return 'WKI100';\n case 5:\n return 'WKJ100';\n case 6:\n return 'WKK100';\n case 7:\n return 'WKL100';\n case 8:\n return 'WKM100';\n case 9:\n return 'WKN100';\n case 10:\n return 'WKO100';\n case 11:\n return 'WKP100';\n default:\n return '';\n }\n }\n return '';\n})();","trigger":"pageload"},{"name":"already_subscribed","polling":"all","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":1,"mibcx":1,"te":1,"cart_rep":{"get":"","set":""},"ulpj":{"RIID":"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// shouldCheckSpa: function() {\n// var pathname = window.location.pathname;\n\n// return pathname.indexOf('/avail/flights/') > -1 || pathname.indexOf('/avail/hotels') > -1 || pathname.indexOf('/destination-less/') > -1;\n// },\n// currentPageIdentifier: function() {\n// return window.location.pathname;\n// }\n// });\n\nSinglePageApp.setCustomParams({\n currentPageIdentifier: function() {\n return window.location.pathname;\n }\n});","crs":{"integrations":null,"pageCount":null},"mat":0,"math":0,"cpnu":"coupons.bounceexchange.com","dfpcms":0,"sms":{"optm":"Hit 'Send' to sign-up for automated, recurring CheapCaribbean mktg txts (like cart reminders) to this #, per terms.","eventSharing":false,"shqId":"","enabled":1},"pde":true,"fmc":["US","CA"],"fme":true,"fmx":"","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},"ga4_property_id":"286591561","ga4_measurement_id":"G-HLF0CWFHRG","tag_state_domain":"api.bounceexchange.com"} ; 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":"581f60941d61db08a2ebc76b84116dcd","creativesBaseStyles":"a53944a2","gpsAuction":"bbb80866120d17013073bb6d284cbd6b","inbox":"8b00c97e2219e5686c0a4fcd0a475cf3","onsite":"0e56ab6ba004ee080ce3deb3edae35e9","sms":"e39203556bab2366e56296ce42e974a7","websdk":"fb3da6ba1a7a78e95cf94d2dc9e22138"}; bouncex.push = function(pushData) { bouncex.pushedData.push(pushData); } var runtime = document.createElement('script'); runtime.setAttribute('src', '//assets.bounceexchange.com/assets/smart-tag/versioned/runtime_6459738026535cda4232dc813c61447d.br.js'); runtime.setAttribute('async', 'async'); runtime.setAttribute('onload', 'bouncex.initializeTag()'); bouncex.initializeTag = function() { var script = document.createElement('script'); script.setAttribute('src', '//assets.bounceexchange.com/assets/smart-tag/versioned/main-v2_21ccd07868faedfb910eb6abb0bce064.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_3a843477d8e318f67237a66d0a58c542.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() {}; }; document.body.appendChild(runtime); } } if (document.readyState === "loading") { document.addEventListener("DOMContentLoaded", bxBootstrap); } else { bxBootstrap(); }})();