(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":4983,"name":"Titan Fitness","cookie_name":"bounceClientVisit4983","domain":"titan.fitness","ct":"fp_local_storage","ally":0,"ei":0,"tcjs":"","cjs":"/* enable.feature.DISABLE_RELOAD_CAMPAIGNS_V2 */\n/* enable.feature.DISABLE_IOS_ABSOLUTE */\n\nbouncex.infoStore = {\n sessionStorageIdentifier: 'bxInfoStore',\n set: function(data) {\n var hashedData = bouncex.lz.compressToURI(JSON.stringify(data));\n try {\n sessionStorage.setItem(this.sessionStorageIdentifier, hashedData);\n } catch(e) {\n bouncex.err('session storage failure');\n }\n },\n \n get: function() {\n var info = sessionStorage.getItem(this.sessionStorageIdentifier);\n return info ? JSON.parse(bouncex.lz.decompressFromURI(info)) : '';\n },\n \n infoIsStored: function() {\n return !!sessionStorage.getItem(this.sessionStorageIdentifier);\n },\n \n populateFields: function(fields) {\n if (!this.infoIsStored()) return;\n \n var data = this.get();\n for (var field in fields) {\n if (fields.hasOwnProperty(field)) {\n fields[field].val(data[field]);\n }\n }\n }\n};\n\n/* --------------------------- INITIALIZE SHOPIFY DYNAMIC COUPON AUTOAPPLY -------------------------- */\n/*\nfunction initShopifyCouponAutoApply() {\n var isShopifyHostedTheme = !!bouncex.utils.getNestedProp('Shopify.theme.id');\n if (isShopifyHostedTheme) {\n bouncex.off(bouncex.window, 'bxCouponFetched.bx-cpn-auto-apply');\n bouncex.on(bouncex.window, 'bxCouponFetched.bx-cpn-auto-apply', function(event, params) {\n if (params.code !== bouncex.vars.coupon_auto_applied) {\n ajaxShopifyAutoApply(params.code);\n }\n });\n }\n}\nfunction ajaxShopifyAutoApply(discount) {\n var updateJSON = JSON.stringify({\n 'discounts': [discount],\n }),\n errorMessage = 'event tracking: error with shopify coupon auto-apply',\n discountUrl = '/discount/'+discount,\n updateUrl = '/cart/update.js';\n jQuery.ajax({\n url: discountUrl,\n method: 'GET',\n })\n .then(function(){\n jQuery.ajax({\n url: updateUrl,\n method: 'POST',\n contentType: 'application/json',\n dataType: 'text',\n data: updateJSON,\n })\n .then(function(){ updateCouponVar(discount); }, function(){ bouncex.log(errorMessage + ' POST ' + updateUrl); });\n }, function(){ bouncex.log(errorMessage + 'GET '+ discountUrl); });\n}\nfunction updateCouponVar(discount) {\n bouncex.setVar('coupon_auto_applied', discount);\n}\ninitShopifyCouponAutoApply();\n*/\n","force_https":false,"waypoints":false,"content_width":900,"gai":"UA-54875448-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":"/* ---------------------------- SHARED VARIABLES ---------------------------- */\n\nvar CLEAN_URL = bouncex.utils.url.allowParams();\n\n/* ------------------------------ ITEM TRACKING ----------------------------- */\n\nfunction getViewItem() {\n\tvar product = bouncex.utils.getNestedProp('window.ShopifyAnalytics.meta.product', {});\n\treturn {\n\t\tid: product.id, // still tracking shopify product id as item id\n\t\tgroupId: bouncex.utils.getNestedProp('window.ShopifyAnalytics.meta.product.variants[0].sku', '') // track first sku on page as groupid because group id that matches feed not on site for \n\t};\n}\n\nfunction initializeItemEvents() {\n\tvar item;\n\n\tbouncex.et.onTrue(\n\t\tfunction () {\n\t\t\titem = getViewItem();\n\t\t\treturn (\n\t\t\t\t!!item.id && !!item.groupId\n\t\t\t);\n\t\t},\n\t\tfunction () {\n\t\t\tif (CLEAN_URL.indexOf('gift-card') > -1) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tbouncex.push(['view item',{ 'item:id': item.id, 'item:itemgroupid': item.groupId }]);\n\t\t\tinitializeSkuEvents(item.id);\n\t\t},\n\t\t10\n\t);\n}\n\n/* ------------------------------ SKU TRACKING ------------------------------ */\n\n\nfunction initializeSkuEvents(itemId) {\n var variants = bouncex.utils.getNestedProp('window.ShopifyAnalytics.meta.product.variants', []);\n if (variants.length === 1) {\n\t\tbouncex.push([\n\t\t\t'select_sku',\n\t\t\t{\n\t\t\t\t'item:id': itemId,\n\t\t\t\t'item:itemgroupid': variants[0].sku,\n\t\t\t\t'item:feedid': variants[0].sku\n\t\t\t}\n\t\t]);\n\t\treturn;\n }\n\n var prevSku = '',\n to;\n\n bouncex.on(bouncex.document, 'change.wknd', function(){\n if (!to) {\n var selectedShopifySku = bouncex.utils.getNestedProp('window.ShopifyAnalytics.meta.selectedVariantId');\n var selectedSku = variants.find(function(v){\n return v.id == selectedShopifySku; // strings and numbers \n }).sku;\n if (selectedSku && selectedSku !== prevSku) {\n \t\tbouncex.push([\n \t\t\t'select_sku',\n \t\t\t{\n \t\t\t\t'item:id': itemId,\n \t\t\t\t'item:itemgroupid': selectedSku,\n \t\t\t\t'item:feedid': selectedSku\n \t\t\t}\n \t\t]);\n \t}\n }\n clearTimeout(to);\n to = bouncex.setTimeout2(() => {\n to = undefined;\n }, 100);\n\n }, '[name=\"id\"]');\n\n}\n\n/* --------------------------- INITIALIZE TRACKING -------------------------- */\n\nfunction isValidDomain() {\n\treturn CLEAN_URL.indexOf('titan.fitness') > -1;\n}\n\nfunction isEn() {\n\treturn bouncex.html.attr('lang') === 'en';\n}\n\nfunction isValidForTracking() {\n\treturn isValidDomain() && isEn();\n}\n\nfunction init() {\n\tif (!isValidForTracking()) {\n\t\treturn;\n\t}\n\n\tswitch (bouncex.website.pts) {\n\t\tcase 'product':\n\t\t\tinitializeItemEvents();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t}\n}\n\ninit();\n","dge":true,"bxidLoadFirst":false,"pie":true,"cme":true,"gbi_enabled":0,"bpush":false,"pt":{"cart":{"testmode":true,"val":[[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/cart"}]]},"category":{"testmode":true,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"dw.ac._category !== ''"}]]},"checkout":{"testmode":true,"val":[[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/startcheckout"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"staging"}]]},"home":{"testmode":true,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"window.location.pathname === '/';"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"demandware"}]]},"product":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"bouncex.utils.getNestedProp('window.ShopifyAnalytics.meta.page.pageType') === 'product';"}]]},"search":{"testmode":true,"val":[[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"search?q="},{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/search"}]]}},"els":{"blank_site_element":"","skip_link":".skip-to-content-link[href=\"#MainContent\"]"},"vars":[{"name":"logged_in","polling":"none","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"wunderkind.user !== undefined","trigger":""},{"name":"ever_logged_in","polling":"none","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"bouncex.vars.logged_in || null;","trigger":""},{"name":"cart_qty","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"0","code":"wunderkind.cart.quantity;","trigger":""},{"name":"cart_value","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"0","code":"wunderkind.cart.value;","trigger":""},{"name":"prod_price","polling":"all","persist":"no","page_types":["product"],"testmode":true,"default":"false","code":"(function () {\n var num = jQuery('.prices .strike-through').length ? jQuery('.product-info-inner .sales > [itemprop=\"price\"]').attr('content') : jQuery('.product-info-inner [itemprop=\"price\"]').attr('content') || '';\n \n if (jQuery('.set-item').length) {\n num = jQuery('.set-item').length > 0 && jQuery('.product-set-area .starting-price').first().text().trim().replace(/[^0-9.]/g, '');\n }\n\n return Number(num.replace(/[^0-9.]/g, '')) || 0;\n})();","trigger":""},{"name":"prod_name","polling":"all","persist":"no","page_types":["product"],"testmode":true,"default":"false","code":"jQuery('.product-name').first().text();","trigger":""},{"name":"in_stock","polling":"all","persist":"no","page_types":["product"],"testmode":true,"default":"false","code":"jQuery('.availability-msg .in-stock').length > 0 && jQuery('.backorder-lbl').length === 0;","trigger":""},{"name":"submitted_onsite","polling":"all","persist":"permanent","page_types":[],"testmode":true,"default":"false","code":"jQuery('.klaviyo-form span').first().text().indexOf('Thanks for subscribing') > -1 || null;","trigger":""},{"name":"page_url","polling":"none","persist":"no","page_types":["category","search"],"testmode":true,"default":"false","code":"","trigger":""},{"name":"cart","polling":"none","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"page_type","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"(function(){\r\n if(window.google_tag_params && google_tag_params.ecomm_pagetype){\r\n const window_obj_pagetype = bouncex.utils.getNestedProp('google_tag_params.ecomm_pagetype', false), \r\n pageTypes = {\r\n 'category' : 'category',\r\n \"cart\":'cart',\r\n };\r\n if(pageTypes[window_obj_pagetype]){\r\n bouncex.website.pts = pageTypes[window_obj_pagetype];\r\n }\r\n \r\n }\r\n return bouncex.website.pts;\r\n})();","trigger":"pageload"},{"name":"logged_in_identified","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"feed_id","polling":"all","persist":"no","page_types":["product"],"testmode":false,"default":"false","code":"jQuery('.product-info-inner [itemprop=\"sku\"]').first().text().trim();","trigger":"pageload"},{"name":"coupon_auto_applied","polling":"none","persist":"visit","page_types":[],"testmode":true,"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":{"bxid":"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":"var audiences = {\n /* PROPERTIES */\n testMode: false,\n interceptEnabled: true,\n mirrorEnabled: true,\n isBouncexReady: function isBouncexReady(callback) {\n var intCount = 0;\n var cartAddSetInterval = setInterval(function () {\n if (typeof bouncex != \"undefined\" && !!bouncex.loaded && bouncex.et && typeof bouncex.et.onTrue === \"function\" && bouncex.website && bouncex.website\n ) {\n callback();\n clearInterval(cartAddSetInterval);\n }\n intCount++;\n if (intCount > 10) {\n _shq.log('Bouncex never loaded', 'error');\n clearInterval(cartAddSetInterval);\n }\n }, 200);\n },\n helpers: function helpers() {\n //finding the product on the site to get more inofrmatio\n function findProductData(pid) {\n var theProd = jQuery('.product-detail[data-pid=\"' + pid + '\"]'),\n productId = theProd.data(\"pid\"),\n price = theProd.find('[class*=\"price\"] .value').attr(\"content\"),\n qty = theProd.find(\"select#quantity-select\").val();\n if (!!productId || !!price || Number(qty) > 0) {\n return {\n ProductId: productId,\n UnitPrice: price,\n Quantity: qty,\n };\n }\n return false;\n }\n //Watching the network traffic for add to cart events\n function processAdd(event, xhr, settings) {\n if (\n (settings.url || \"\").indexOf(\"/Cart-AddProduct\") > -1 &&\n settings.type == \"POST\"\n ) {\n var atcData = settings.data,\n prodObj = bouncex.utils.url.getParam(\"pidsObj\", atcData),\n prodId = bouncex.utils.url.getParam(\"pid\", atcData);\n prods = null;\n if (!!prodId && !prodObj) {\n prods = { Items: [] };\n var getProd = findProductData(prodId);\n if (!!getProd) {\n prods.Items.push(getProd);\n }\n } else if (!!prodObj) {\n var products = JSON.parse(prodObj);\n prods = products.reduce(\n function (x, y) {\n var getProd = findProductData(y.pid);\n if (!!getProd) {\n x.Items.push(getProd);\n }\n return x;\n },\n { Items: [] }\n );\n }\n if (!!prods.Items) {\n _shq.push([\"onCartAdd\", { Items: prods.Items }]);\n }\n }\n }\n audiences.isBouncexReady(function () {\n if (bouncex.website.pts === \"product\") {\n var test = bouncex.et.on(\n jQuery(document),\n \"ajaxComplete\",\n processAdd\n );\n }\n });\n },\n /* Intercept Events: For overriding the default events that the cartridge attempts to make. */\n useIntercept: function useIntercept() {\n if (!this.interceptEnabled) {\n return;\n }\n bouncex.utils.shqInterceptEvent = {\n // true blocks default event, defined functions run in place of default\n productView: false,\n cartAdd: true,\n cartEmpty: false,\n categoryView: false,\n purchase: function (wkData) {\n var wkPurchase = wkData.obj;\n if (!!wkPurchase) {\n var purchaseData = wkPurchase.item.reduce(\n function (x, y) {\n if (y.sku && !!Number(y.item_price) && y.quantity) {\n x.orderItems.push({\n productId: y.sku,\n price: Number(y.item_price).toFixed(2),\n qty: y.quantity,\n });\n x.total +=\n Number(y.item_price).toFixed(2) *\n Number(y.quantity);\n }\n return x;\n },\n { orderItems: [], total: 0, orderId: null }\n );\n purchaseData.orderId = bouncex.utils.getNestedProp(\n \"order_id\",\n \"no-orderid-\" + Math.floor(Math.random() * 100000000),\n wkPurchase\n );\n if (!!purchaseData.orderItems.length) {\n purchaseData.total = purchaseData.total.toFixed(2);\n _shq.push([\"onPurchase\", purchaseData]);\n } else {\n _shq.push([\n \"onPurchase\",\n {\n orderId:\n orderId || \"NoOrderId-\" + randomNumber(),\n usebasket: true,\n },\n ]);\n }\n }\n },\n coupon: false,\n search: false,\n checkout: false,\n email: false,\n phone: false,\n };\n },\n\n /* Mirror Events: For firing events when WKND events fire.*/\n useMirror: function useMirror() {\n if (!this.mirrorEnabled) {\n return;\n }\n bouncex.utils.shqMirrorEvent = {\n // defined functions run after designated shq_wknd_event to process event or source names\n reloadcampaigns: false,\n pageview: function () {\n //for search page \n if (bouncex.website.pts === \"category\" && bouncex.utils.url.getParam('q')) {\n var sp = decodeURI(bouncex.utils.url.getParam('q'));\n _shq.push(['onSearch', { searchPhrase: sp }]);\n }\n //for category\n if (bouncex.website.pts === 'category' && !bouncex.utils.url.getParam('q')) {\n var catUrlArr = window.location.pathname.split('/').filter(function (x) { return x = x; }).slice(-2),\n catOptions = ['catId', 'catName'],\n catData = catOptions.reduce(function (x, y, i) {\n var theCat = catUrlArr[i] ? catUrlArr[i] : catUrlArr[0];\n x[y] = theCat;\n return x;\n }, {});\n _shq.push(['onCategory', catData]);\n }\n },\n \"add to cart\": false,\n \"view item\": false,\n select_sku: false,\n item: false,\n eligible: false,\n pop: false,\n visit: false,\n };\n },\n\n /* Initialize audiences Tracking */\n init: function init() {\n // test mode\n if (this.testMode && !bouncex.testmode.bxdev) return;\n // attach object to bouncex.et\n if (!bouncex.et) {\n return;\n }\n bouncex.et.audiences = this;\n // initialize main functions\n this.useIntercept();\n this.useMirror();\n this.helpers();\n },\n};\n\naudiences.init();\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 Titan Fitness mktg txts (like cart reminders) to this #, per terms.","eventSharing":true,"shqId":"cw4212tdqe-1","enabled":1},"pde":true,"fmc":["AW","AI","AG","AR","BS","BB","BZ","BM","BO","BQ","BR","CA","KY","CL","CO","CR","CU","CW","DM","DO","EC","SV","GF","GL","GD","GT","GP","HT","HN","JM","MQ","MX","MS","NI","PA","PY","PE","PR","PM","MF","BL","KN","LC","VC","SX","SR","TT","US","UM","UY","VE","VG","VI"],"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":"307818505","ga4_measurement_id":"G-GSHMQEZCGN","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":"9d4991ea09f5bc1b2f3361f0b63c3443","creativesBaseStyles":"a53944a2","gpsAuction":"bbb80866120d17013073bb6d284cbd6b","inbox":"75060a85c1a4aebcc6f779b9e84db722","onsite":"abbdf7a49be9b52b097917b7b527b262","sms":"e39203556bab2366e56296ce42e974a7","websdk":"0df0ee1d39c3e46e93a5041146975258"}; 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_3ef933ee1b4fe937e2a2653d5578bea3.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() {}; }; runtime.onload = bouncex.initializeTag; document.body.appendChild(runtime); } window._shq = window._shq || []; var eventSharingCartridge = document.createElement('script'); eventSharingCartridge.setAttribute('src', '//assets.bounceexchange.com/assets/smart-tag/versioned/wknd_audiences_2648fa8509e4b3a98a2790bb8171ddc1.js'); eventSharingCartridge.setAttribute('async', 'async'); document.body.appendChild(eventSharingCartridge); } if (document.readyState === "loading") { document.addEventListener("DOMContentLoaded", bxBootstrap); } else { bxBootstrap(); }})();