(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":3382,"name":"Megabus: CA","cookie_name":"bounceClientVisit3382","domain":"ca.megabus.com","ct":"bind_to_domain","ally":1,"ei":0,"tcjs":"","cjs":"bouncex.on(bouncex.window, 'bxPathChange', function() {\n clearTimeout(bouncex.spaTimeout);\n bouncex.spaTimeout = setTimeout2(function() {\n bouncex.log('bx: detect page change');\n bouncex.calling_url = encodeURIComponent(window.location.href);\n bouncex.body = jQuery('body').eq(0);\n\n init_vars();\n bouncex.cookie.vpv++;\n bouncex.pa = 0;\n setBounceCookie();\n\n for (var ca_id in bouncex.campaigns) {\n if (bouncex.campaigns.hasOwnProperty(ca_id)) {\n bouncex.destroy_ad(ca_id);\n }\n }\n bouncex.reload_campaigns();\n\n init_ibx_tracking();\n init_event_tracking();\n }.bind(this), 500);\n}.bind(this));","force_https":false,"waypoints":false,"content_width":900,"gai":"UA-93249331-3","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":1},"burls":[],"ple":false,"fbe":true,"ffs":"","mas":2,"map":1,"gar":true,"ete":2,"ettm":false,"etjs":"var stateMap = {\n\t'DC': 'USA', 'MD': 'USA', 'NY': 'USA', 'PA': 'USA',\n\t'AB': 'Alberta', 'BC': 'British Columbia', 'MB': 'Manitoba', 'NB': 'New Brunswick',\n\t'NL': 'Newfoundland and Labrador', 'NT': 'Northwest Territories', 'NS': 'Nova Scotia', \n\t'NU': 'Nunavut', 'ON': 'Ontario', 'PE': 'Prince Edward Island', \n\t'PQ': 'Quebec', 'QC': 'Quebec', 'SK': 'Saskatchewan', 'YT': 'Yukon Territory'\n\t},\n\tALLOWED_DOMAINS = ['ca.megabus.com'];\n\n/* ----------- HELPER FUNCTIONS ---------------- */\n\nfunction isValidDomain() {\n\treturn ALLOWED_DOMAINS.indexOf(window.location.hostname) > -1;\n}\n\nfunction isSearchPage() {\n\treturn jQuery('.ticket').length > 0;\n}\n\nfunction getParams(url) {\n\tvar params = {};\n\tvar parser = document.createElement('a');\n\tparser.href = url;\n\tvar query = parser.search.substring(1);\n\tvar vars = query.split('&');\n\tfor (var i = 0; i < vars.length; i++) {\n\t\tvar pair = vars[i].split('=');\n\t\tif (pair[0] !== 'sc') {\n\t\t params[pair[0]] = decodeURIComponent(pair[1]); \n\t\t}\n\t}\n\treturn params;\n}\n\nfunction getItemId() {\n\tvar paramsObj = getParams(window.location.href);\n\tvar valuesArr = Object.values(paramsObj);\n\tvar id = valuesArr.reduce(function(acc, curr){\n\t\treturn acc + curr;\n\t});\n\treturn id;\n}\n\nfunction getDepartureCity(){\n\tvar journey = jQuery('.journey-planner__location:eq(0)').text();\n\tvar journeyFrom = journey.split(' to ')[0];\n\treturn journeyFrom && journeyFrom.split(',')[0].trim();\n}\n\nfunction getDestinationCity(){\n\tvar journey = jQuery('.journey-planner__location:eq(0)').text().trim();\n\tvar journeyTo = journey.split(' to ')[1];\n\treturn journeyTo && journeyTo.split(',')[0].trim();\n}\n\nfunction getDepartureState(){\n\tvar journey = jQuery('.journey-planner__location:eq(0)').text();\n\tvar journeyFrom = journey.split(' to ')[0];\n\treturn journeyFrom && journeyFrom.split(',')[1].trim();\n}\n\nfunction getDestinationState(){\n\tvar journey = jQuery('.journey-planner__location:eq(0)').text().trim();\n\tvar journeyTo = journey.split(' to ')[1];\n\treturn journeyTo && journeyTo.split(',')[1].trim();\n}\n\nfunction getDepDate(){\n\treturn bouncex.utils && bouncex.utils.getParam('departureDate', window.location.search);\n}\n\nfunction getDepartureTimeStamp() {\n return new Date(getDepDate() + 'T23:59').getTime();\n}\n\nfunction getFormattedDepartureDate() {\n\tvar dateArr = new Date(getDepDate() + 'T04:00').toDateString().split(' ').slice(1);\n\tdateArr[1] += ',';\n\treturn dateArr.join(' ').toUpperCase();\n}\n\nfunction getItemData() {\n\tvar id = getItemId(),\n\t\tdepState = getDepartureState(),\n\t\tdestState = getDestinationState();\n\n\tsessionStorage.setItem('bxItemId', id);\n\treturn { \n\t\tid: id,\n\t\tdeparture_city: getDepartureCity(),\n\t\tdeparture_state: stateMap[depState],\n\t\tdestination_city: getDestinationCity(),\n\t\tdestination_state: stateMap[destState],\n\t\tdeparture_date: getFormattedDepartureDate(),\n\t\tdeparture_timestamp: getDepartureTimeStamp(),\n\t\turl: bouncex.utils.url.removeParams('sc')\n\t};\n}\n\nfunction itemDataLoaded() {\n\treturn getDepartureCity() \n\t\t&& getDestinationCity() \n\t\t&& getDepartureState() \n\t\t&& getDestinationState();\n}\n\nfunction trackedPage() {\n return window.location.href.indexOf('return') === -1 && window.location.href.indexOf('track-my-bus') === -1;\n}\n\n/* ----------- CART SETTINGS ------------------- */\n\nbouncex.et.cart.init({\n\treplenish: function() {},\n\treplenishmentType: 'single',\n\tstoreValues: [], \n});\n\n\nfunction emptyCart() {\n\tvar inCart = window.location.href.indexOf('basket') > -1;\n\n\tif (bouncex.vars.cart_set && inCart) {\n\t\tbouncex.push(['empty_cart', {}]);\n\t\tbouncex.setv('cart_set', false);\n\t\tsetBounceCookie();\n\t}\n}\n\nfunction trackEmptyCart(){\n\tbouncex.et.onVisible('.no-results__head', emptyCart);\n}\n\n/* ----------- TRACKING ------------------- */\n\nif (isValidDomain()) {\n\twindow.setTimeout(function() {\n\t\tif (isSearchPage() && trackedPage()) {\n\t\t\t/* item tracking */\n\t\t\tbouncex.et.onTrue(itemDataLoaded, function() {\n\t\t\t\tvar itemData = getItemData();\n\t\t\t\tif(itemData) {\n\t\t\t\t\tbouncex.push(['item', itemData]);\n\t\t\t\t\tbouncex.push(['view item', {'item:id' : itemData.id}]);\n\t\t\t\t}\n\n\t\t\t});\n\n\t\t\t/* tracking Add to Cart */\n\t\t\tjQuery('.ticket__actions button').on('click',function(){\n\t\t\t\tvar itemId = sessionStorage.getItem('bxItemId');\n\t\t\t\tbouncex.push(['add to cart', {\n\t\t\t\t\t'item:id': itemId\n\t\t\t\t}]);\n\t\t\t\tsessionStorage.removeItem('bxItemId');\n\t\t\t\tbouncex.setv('cart_set', true);\n\t\t\t\tsetBounceCookie();\n\t\t\t}); \n\t\t}\n\n\t\ttrackEmptyCart();\n\n\t}, 1000);\n}","dge":true,"bxidLoadFirst":false,"pie":true,"cme":true,"gbi_enabled":0,"bpush":false,"pt":{"cart":{"testmode":false,"val":[[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/seat-reservation"},{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/basket"}]]},"checkout":{"testmode":false,"val":[[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/secure-checkout/"},{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/journey-planner/login"}]]},"homepage":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"document.querySelectorAll('#homepageContentArea').length > 0;"}]]},"search":{"testmode":false,"val":[[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/journey-planner/"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"/seat-reservation"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"/basket"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"/login"}]]}},"els":{"Cart_checkout_button":".btn-primary","Footer":"footer","Navigation_bar":"nav","Search_Results":"#resultsAccordion","Ticket_Price":".ticket__price"},"vars":[{"name":"cart_qty","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"Number(jQuery('a.navbar__basket__icon').text().replace(/[^0-9]/g, ''));\n/* added polling and some safety logic */","trigger":"pageload"},{"name":"cart_set","polling":"none","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"spa_event_emitter","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"(function() {\n bouncex.prevPath = bouncex.prevPath || window.location.href;\n if (bouncex.prevPath !== window.location.href) {\n if (bouncex.window) {\n bouncex.window.trigger('bxPathChange');\n }\n bouncex.prevPath = window.location.href;\n }\n return false; \n})();","trigger":"pageload"},{"name":"valid_domain","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"window.location.hostname === 'ca.megabus.com';","trigger":"pageload"},{"name":"origin_city","polling":"all","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"(function() {\n var originCity = jQuery('.journey-planner__location:eq(0)').text().trim().match(/\\b.*?\\b(?=to)/g) || [];\n return originCity.length ? originCity[0].trim() : null;\n})();","trigger":"pageload"},{"name":"destination_city","polling":"all","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"(function() {\n var destinationCity = jQuery('.journey-planner__location:eq(0)').text().split('to ')[1];\n if (destinationCity) {\n return destinationCity.substring(0, destinationCity.length - 2);\n } else {\n return null;\n }\n})();","trigger":"pageload"},{"name":"round_trip","polling":"all","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"(function() {\n var oneWay = jQuery('.journey-planner .journey-planner__location:contains(\"One way\")').length > 0;\n var roundTrip = jQuery('.journey-planner .journey-planner__location:contains(\"Round trip\")').length > 0;\n /* value should reset if user chooses one way */\n if (oneWay) {\n return false;\n }\n /* the following should persist through to cart */\n return roundTrip || null;\n})();","trigger":"pageload"},{"name":"departure_date","polling":"all","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"(function() {\n /* value should persist through to cart */\n if (bouncex.utils) {\n return bouncex.utils.getParam('departureDate', window.location.search) || null;\n }\n})();","trigger":"pageload"},{"name":"return_date","polling":"all","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"(function() {\n if (window.location.href.indexOf('/journeys/return') > -1) {\n var returnDate = jQuery('input.form-control[max]')[1].value.split('/');\n var formattedDate = returnDate[2]+\"-\"+returnDate[0]+\"-\"+returnDate[1];\n return formattedDate || null;\n }\n /* value should persist through to cart */\n if (bouncex.utils) {\n return bouncex.utils.getParam('inboundDepartureDate', window.location.search) || null;\n }\n})();","trigger":"pageload"},{"name":"departure_city","polling":"all","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"(function() {\n if (jQuery('.journey-planner__location:eq(0)').text().trim() === 'to ,') {\n return null;\n }\n var journey = jQuery('.journey-planner__location:eq(0)').text();\n\tvar journeyFrom = journey.split('to')[0];\n\tvar noStateAeroport = journeyFrom.indexOf('Midway Intl') > -1 || journeyFrom.indexOf(\"O'Hare Intl\") > -1;\n\t/* added persistence */\n\tif (!noStateAeroport) {\n\t\treturn journey.split(',')[0].trim() || null;\n\t} else {\n\t\treturn journey.split('to')[0].trim() || null;\n\t}\n})();","trigger":"pageload"},{"name":"ibx_destination_city","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"(function() {\n\tvar journey = jQuery('.journey-planner__location:eq(0)').text().trim();\n\tvar journeyTo = journey.split('to')[1];\n\tvar noStateAeroport = journeyTo&& journeyTo.indexOf('Midway Intl') > -1 || journeyTo && journeyTo.indexOf(\"O'Hare Intl\") > -1;\n\tif ( noStateAeroport ) { return journey.split('to')[1].slice(0,-1); }\n\tvar match = journey && journey.match(/to\\s([\\w\\s\\(\\)\\.]+)/);\n\tif (match && match[1]) {\n\t\treturn match[1];\n\t}\n })();","trigger":"pageload"},{"name":"departure_state","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"(function() {\n var journey = jQuery('.journey-planner__location:eq(0)').text().trim();\n var journeyFrom = journey.split('to')[0];\n var noStateAeroport = journeyFrom.indexOf('Midway Intl') > -1 || journeyFrom.indexOf(\"O'Hare Intl\") > -1;\n if ( noStateAeroport ) { \n return null; \n }\n var match = journey && journey.match(/,\\s([\\w]+)/);\n if (match && match[1]) {\n return match[1] || null;\n }\n})();","trigger":"pageload"},{"name":"destination_state","polling":"all","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"(function() {\n /* replaced IL logic with persistence */\n var journey = jQuery('.journey-planner__location:eq(0)').text().trim();\n var match = journey && journey.match(/to.*,\\s([\\w]+)/);\n if (match && match[1]) {\n return match[1];\n } else {\n return null; \n }\n})();","trigger":"pageload"},{"name":"over_12hr_from_departure","polling":"all","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"(function() {\n if (jQuery('input.form-control[max]')[0].value === 'Today') {\n var currTime = new Date().getHours();\n return currTime < 12 ? true : false;\n }\n if (jQuery('input.form-control[max]')[0].value === 'Tomorrow' || jQuery('input.form-control[max]')[0].value.indexOf('/') > -1) {\n \treturn true;\n }\n if (bouncex.utils.getParam('departureDate', window.location.search) === '') { \n return null;\n }\n var depart_date = new Date( Date.parse(bouncex.utils.getParam('departureDate', window.location.search)+'T23:59'));\n var currDate = new Date(),\n timeDiff = depart_date - currDate,\n seconds = timeDiff / 1000,\n hours = parseInt( seconds / 3600 );\n return hours > 12;\n})();","trigger":"pageload"},{"name":"search_page","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"jQuery('.ticket').length > 0;","trigger":"pageload"},{"name":"most_recent_search_url","polling":"none","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"(function() {\n var path = window.location.pathname;\n if (path.indexOf('/journey-planner') > -1 && path.indexOf('/journeys/return') === -1 && path.indexOf('/seat-reservation') === -1 && path.indexOf('/basket') === -1 && path.indexOf('/login') === -1) {\n return window.location.href;\n } else {\n return null;\n }\n})();","trigger":"pageload"},{"name":"recent_search_date_over_12hrs","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"(function() {\n var depart_date = new Date( Date.parse(bouncex.utils.url.getParam('departureDate', bouncex.vars.most_recent_search_url)+'T23:59'));\n var currDate = new Date(),\n timeDiff = depart_date - currDate,\n seconds = timeDiff / 1000,\n hours = parseInt( seconds / 3600 );\n \n return hours > 12;\n})();","trigger":"pageload"},{"name":"previously_searched_destination","polling":"none","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"(function() {\n var path = window.location.pathname;\n if (path.indexOf('/journey-planner') > -1 && path.indexOf('/journeys/return') === -1 && path.indexOf('/seat-reservation') === -1 && path.indexOf('/basket') === -1 && path.indexOf('/login') === -1) {\n return jQuery('#goingTo').val().trim();\n } else {\n return null;\n }\n})();","trigger":"pageload"},{"name":"ppl_viewing","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"Math.floor(Math.random() * 400) + 3800;","trigger":"pageload"},{"name":"reserved_seats_sold_out","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"window.location.href.indexOf('/journey-planner/seat-reservation?') > -1 ? jQuery('.seat-plan__seats .price.ng-star-inserted:not(.unavailable), .price.ng-star-inserted:visible').length === 0 : null;","trigger":"pageload"},{"name":"number_of_travelers","polling":"all","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"(function(){\n var $cartTravelers = jQuery('.ticket__costs__item');\n var $searchTravelers = jQuery('.ticket__summary__travellers');\n \n if ($cartTravelers.length > 0) {\n return $cartTravelers.first().text().replace(/[^0-9]/g, '');\n } else if ($searchTravelers.length > 0) {\n return $searchTravelers.first().text().replace(/[^0-9]/g, '');\n }\n \n return null; \n})();","trigger":"pageload"},{"name":"cart_value","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"(function() {\n var miniCartTotal = jQuery('.mini-basket__total__fig').text().match(/\\d+,?\\d+.\\d+/g) || [];\n return miniCartTotal.length ? parseFloat(miniCartTotal[0]) : 0;\n})();","trigger":"pageload"},{"name":"logged_in","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"jQuery('li.authenticated:visible:contains(Log out), body.authenticated').length > 0;\n/* discovered that the body adds an authenticated class after logging in */","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":"purchased_last_5_days","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"(function() {\n var currentTime = parseInt(new Date().getTime() / 1000);\n return bouncex.cookie.lc ? Math.floor((currentTime - bouncex.cookie.lc) / 86400) <= 5 : false;\n})();","trigger":"pageload"},{"name":"socially_distanced_seating_legend","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"(function(){\n var today = new Date(),\n month = today.getMonth(),\n day = today.getDate(),\n $date = jQuery('input[id*=\"mat-input\"]').val(),\n dayValues = $date.split(\"/\");\n \n if(!$date) {\n return false;\n }\n\n if ((dayValues[0] === 'Today' || dayValues[0] === 'Hoy' || dayValues[0] === \"Aujourd'hui\") && (month < 4 || month === 4 && day <= 10)) {\n return true;\n }\n\n if ((dayValues[0] === 'Tomorrow' || dayValues[0] === \"MaƱana\" || dayValues[0] === 'Demain') && (month < 4 || month === 4 && day <= 9)) {\n return true;\n }\n\n if ((Number(dayValues[0]) === 5 && Number(dayValues[1]) <= 10) || Number(dayValues[0]) < 5) {\n return true;\n } \n return false;\n}());","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":{"sc_uid":"espemailid"},"cus":"","miw_exclude":"","enabled":1},"etjson":null,"osre":true,"osru":"osr.bounceexchange.com/v1/osr/items","checkDfp":false,"gamNetwork":"","spa":0,"spatm":1,"preinit_cjs":"","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","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":"377714751","ga4_measurement_id":"G-WTTHSDSL5X","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":"07b86cd800c4a4f31f957b17ec5e440e","creativesBaseStyles":"a53944a2","gpsAuction":"da7f2123bbe2e5d4e3b41dcea412be5c","inbox":"02aca5df0e176b8810a86da97ac05424","onsite":"0e56ab6ba004ee080ce3deb3edae35e9","sms":"e39203556bab2366e56296ce42e974a7","websdk":"9bfb4101582921c2f3bc6525926ca102"}; 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_533d031a0a5ca2c9d24e6369b88e2862.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(); }})();