(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":6024,"name":"Watch Station US-EN | Fossil Group","cookie_name":"bounceClientVisit6024","domain":"watchstation.comen-us","ct":"fp_local_storage","ally":0,"ei":0,"tcjs":"","cjs":"","force_https":false,"waypoints":false,"content_width":900,"gai":"UA-139471838-5","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 ---------------------------- */\r\nvar CART_COOKIE_KEY = 'dwanonymous_6f4f1f58c2160f1342ed02dc8b79248d',\r\n CLEAN_URL = bouncex.utils.url.allowParams();\r\n/* ---------------------------- HELPERS ---------------------------- */\r\nfunction fireSelectSKU(id) {\r\n\tvar pushItem = {\r\n\t\t'item:id': id,\r\n\t\t'item:itemgroupid': id,\r\n\t\t'item:feedid': id\r\n\t};\r\n\tbouncex.push(['select_sku', pushItem]);\r\n}\r\n/* ------------------------------ ITEM TRACKING ----------------------------- */\r\nfunction getMainImage() {\r\n\tvar imgURL = jQuery('.photo a[href*=\"main\"]').attr('href');\r\n\treturn imgURL || '';\r\n}\r\nfunction getItem() {\r\n\tvar itemObject = bouncex.parseJSON(jQuery('.add-to-cart').attr('data-gtmdata'), {});\r\n\treturn {\r\n\t\tid: itemObject.sku || jQuery('.top-attributes .attribute:first span:last').text().trim(),\r\n\t\tcopy: itemObject.name || jQuery('.product-name:first').text().trim(),\r\n\t\tcategory: itemObject.category || 'Global',\r\n\t\turl: CLEAN_URL,\r\n\t\timageurl: getMainImage(),\r\n\t\tinstock: jQuery('.add-to-cart').text().toLowerCase().indexOf('add to bag') > -1 || jQuery('.add-to-cart').text().toLowerCase().indexOf('in the cart') > -1,\r\n\t};\r\n}\r\nfunction fireViewItem(id) {\r\n\tvar pushItem = {\r\n\t\t'item:id': id,\r\n\t\t'item:itemgroupid': id,\r\n\t};\r\n\tbouncex.push(['view item', pushItem]);\r\n}\r\nfunction initializeItemEvents() {\r\n\tvar item;\r\n\tbouncex.et.onTrue(\r\n\t\tfunction () {\r\n\t\t\titem = getItem();\r\n\t\t\treturn !!item.id &&\r\n\t\t\t\t!!item.copy &&\r\n\t\t\t\t!!item.category &&\r\n\t\t\t\t!!item.url &&\r\n\t\t\t\t!!item.imageurl;\r\n\t\t},\r\n\t\tfunction () {\r\n\t\t\tif (item.url.indexOf('gift-card') > -1) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\titem.id = item.id + '-WSI';\r\n\t\t\tbouncex.push(['item', item]);\r\n\t\t\tfireViewItem(item.id);\r\n\t\t\tinitializeSkuTracking(item.id);\r\n\t\t},\r\n\t\t10\r\n\t);\r\n}\r\nfunction initializeSkuTracking(itemId) {\r\n\tvar $skuTiles = jQuery('.swatch-tile');\r\n\tif ($skuTiles.length > 1) {\r\n\t\tbouncex.on(\r\n\t\t\tjQuery('.swatch-tile'),\r\n\t\t\t'click.bxsku',\r\n\t\t\tfunction (e) {\r\n\t\t\t\tvar itemId = jQuery(e.target).attr('data-attr-value') || jQuery(e.target).find('span[data-attr-value').attr('data-attr-value') || '';\r\n\t\t\t\tif (!itemId) return;\r\n\t\t\t\titemId = itemId.indexOf('WSI') === -1 ? itemId + '-WSI' : itemId;\r\n\t\t\t\tfireSelectSKU(itemId)\r\n\t\t\t}\r\n\t\t);\r\n\t} else {\r\n\t\tfireSelectSKU(itemId)\r\n\t}\r\n}\r\n/* ---------------------------- CATEGORY TRACKING --------------------------- */\r\nfunction getItemIdsCat() {\r\n\tvar ids = [];\r\n\tjQuery('.product-tile').each(function (i, e) {\r\n\t\tvar id = bouncex.parseJSON(jQuery(e).find('.tile-body .pdp-link:last a').attr('data-gtmdata'), {}).id;\r\n\t\tif (id && !ids.indexOf(id) > -1) {\r\n\t\t\tids.push(id + '-WSI');\r\n\t\t}\r\n\t});\r\n\treturn ids.join(',');\r\n}\r\nfunction getCategoryObject() {\r\n\treturn {\r\n\t\t'page:url': bouncex.utils.url.allowParams(['q', 'lang']),\r\n\t\t'items:ids': getItemIdsCat()\r\n\t};\r\n}\r\nfunction initializeCategoryEvents() {\r\n\tvar categoryObj;\r\n\tbouncex.et.onTrue(\r\n\t\tfunction () {\r\n\t\t\tcategoryObj = getCategoryObject();\r\n\t\t\treturn !!categoryObj['items:ids'].length &&\r\n\t\t\t\t!!categoryObj['page:url'];\r\n\t\t},\r\n\t\tfunction () {\r\n\t\t\tbouncex.push(['view category', categoryObj]);\r\n\t\t\tinitializeQuickViewClickTracking();\r\n\t\t},\r\n\t\t10\r\n\t);\r\n}\r\n/* ------------------------------- CART EVENTS ------------------------------ */\r\nfunction initializeQuickViewClickTracking() {\r\n\tvar itemId;\r\n\tbouncex.et.on(bouncex.document, 'click.bxquickview', function () {\r\n\t\tbouncex.et.onTrue(\r\n\t\t\tfunction () {\r\n\t\t\t\titemId = jQuery('.add-to-cart-global:visible').attr('data-pid');\r\n\t\t\t\treturn itemId;\r\n\t\t\t},\r\n\t\t\tfunction () {\r\n\t\t\t itemId = itemId.indexOf('WSI') === -1 ? itemId + '-WSI' : itemId;\r\n\t\t\t\tfireViewItem(itemId)\r\n\t\t\t\tfireSelectSKU(itemId)\r\n\t\t\t},\r\n\t\t\t10\r\n\t\t);\r\n\t}, '.quickview');\r\n}\r\n\r\nfunction emptyCart() {\r\n\tbouncex.et.onVarChange('cart_qty', function (oldVal, newVal) {\r\n\t\tif (bouncex.vars.cart && newVal === 0 && oldVal > 0) {\r\n\t\t\tbouncex.push(['empty_cart']);\r\n\t\t\tbouncex.setVar('cart', false);\r\n\t\t}\r\n\t});\r\n}\r\n\r\nfunction AJAXfireAddToCart(itemId, replenItem) {\r\n bouncex.push([\r\n 'add to cart',\r\n {\r\n 'item:id': itemId.indexOf('WSI') === -1 ? itemId + '-WSI' : itemId,\r\n 'cart:item': bouncex.stringify(replenItem)\r\n }\r\n ]);\r\n\r\n if (bouncex.vars.cart) {\r\n return;\r\n }\r\n bouncex.setVar('cart', true);\r\n}\r\n\r\nfunction trackAJAXCart(e, xhr, settings) {\r\n if (\r\n settings.url.indexOf('/on/demandware.store/Sites-wsi-us-Site/en_US/Cart-AddProduct') > -1\r\n && !bouncex.utils.url.getParam('bx_cart')\r\n && xhr.status === 200\r\n ) {\r\n var data = bouncex.utils.url.queryStringToObject(settings.data) || {},\r\n id = data.pid || '',\r\n replenItem = {\r\n 'pid': data.pid || '',\r\n 'qty': data.quantity || ''\r\n };\r\n\r\n if (!id || !replenItem.pid || !replenItem.qty) {\r\n return;\r\n }\r\n\r\n AJAXfireAddToCart(id, replenItem);\r\n }\r\n}\r\n\r\nfunction initializeAjaxCartEvents() {\r\n bouncex.et.cart.init({\r\n replenishmentType: 'ajax',\r\n replenish: function (cart) {\r\n var deferreds = [];\r\n\r\n cart.items.forEach(function (item) {\r\n deferreds.push(makeAjaxATCFunc(item));\r\n });\r\n\r\n deferreds.reduce(\r\n function (promise, func) {\r\n return promise.then(function () {\r\n return func();\r\n });\r\n },\r\n jQuery.Deferred().resolve([])\r\n )\r\n .then(AjaxReplenComplete);\r\n }\r\n });\r\n\r\n function makeAjaxATCFunc(replenItem) {\r\n return function () {\r\n return jQuery.ajax({\r\n type: 'POST',\r\n url: 'https://www.watchstation.com/on/demandware.store/Sites-wsi-us-Site/en_US/Cart-AddProduct',\r\n data: {\r\n cartAction: 'add',\r\n pid: replenItem.pid,\r\n quantity: replenItem.qty,\r\n }\r\n });\r\n };\r\n }\r\n\r\n function AjaxReplenComplete() {\r\n window.location.href = CLEAN_URL + '?bx_replen=true';\r\n }\r\n\r\n bouncex.et.on(bouncex.document, 'ajaxComplete.wknd', trackAJAXCart);\r\n\r\n emptyCart();\r\n}\r\n\r\n/* ------------------------------ USER TRACKING ----------------------------- */\r\nfunction initializeUserTracking() {\r\n\tif (!bouncex.vars.logged_in || !!bouncex.vars.logged_in_identified) {\r\n\t\treturn;\r\n\t}\r\n\tvar userEmail;\r\n\tbouncex.et.onTrue(\r\n\t\tfunction () {\r\n\t\t\tuserEmail = jQuery('input[id=\"email\"]').val();\r\n\t\t\treturn bouncex.utils.validate.email(userEmail);\r\n\t\t},\r\n\t\tfunction () {\r\n\t\t\tbouncex.push([\r\n\t\t\t\t'user',\r\n\t\t\t\t{\r\n\t\t\t\t\t'email': userEmail,\r\n\t\t\t\t\t'source': 'LoggedIn'\r\n\t\t\t\t}\r\n\t\t\t]);\r\n\t\t\tbouncex.setVar('logged_in_identified', true);\r\n\t\t},\r\n\t\t5\r\n\t);\r\n}\r\n/* --------------------------- INITIALIZE TRACKING -------------------------- */\r\nfunction isValidDomain() {\r\n\treturn CLEAN_URL.indexOf('www.watchstation.com') > -1;\r\n}\r\nfunction isEn() {\r\n\treturn bouncex.html.attr('lang') === 'en';\r\n}\r\nfunction isValidForTracking() {\r\n\treturn isValidDomain() && isEn();\r\n}\r\nfunction init() {\r\n\tif (!isValidForTracking()) {\r\n\t\treturn;\r\n\t}\r\n\tif (CLEAN_URL.indexOf('/profile') > -1) {\r\n\t\tinitializeUserTracking();\r\n\t}\r\n\tinitializeAjaxCartEvents();\r\n\tswitch (bouncex.website.pts) {\r\n\t\tcase 'home':\r\n\t\t\tinitializeQuickViewClickTracking();\r\n\t\t\tbreak;\r\n\t\tcase 'category':\r\n\t\tcase 'search':\r\n\t\t\tinitializeCategoryEvents();\r\n\t\t\tbreak;\r\n\t\tcase 'product':\r\n\t\t\tinitializeItemEvents();\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tbreak;\r\n\t}\r\n}\r\ninit();","dge":true,"bxidLoadFirst":false,"pie":true,"cme":true,"gbi_enabled":0,"bpush":false,"pt":{"cart":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"(function() {\nvar i = 0;\nwhile (i < dataLayer.length) {\n if (dataLayer[i].page) {\n return dataLayer[i].page.type === 'bag';\n }\n i++;\n}\n})();"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"staging-na01-fossil."}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"staging.fossil"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"dev.fossil"}]]},"category":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"(function() {\nvar i = 0;\nwhile (i < dataLayer.length) {\n if (dataLayer[i].page) {\n return dataLayer[i].page.template === 'categoryproducthits';\n }\n i++;\n}\n})();"}]]},"checkout":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"(function() {\nvar i = 0;\nwhile (i < dataLayer.length) {\n if (dataLayer[i].page) {\n return dataLayer[i].page.type === 'delivery';\n }\n i++;\n}\n})();"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"sandbox.us01"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"dev.fossil"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"staging.fossil"}]]},"home":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"(function() {\nvar i = 0;\nwhile (i < dataLayer.length) {\n if (dataLayer[i].page) {\n return dataLayer[i].page.type === 'home';\n }\n i++;\n}\n})();"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"sandbox.us01"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"dev.fossil"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"staging-na01-fossil"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"staging.fossil"}]]},"product":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"(function() {\nvar i = 0;\nwhile (i < dataLayer.length) {\n if (dataLayer[i].page) {\n return dataLayer[i].page.type === 'pdp';\n }\n i++;\n}\n})();"}]]},"search":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"(function() {\nvar i = 0;\nwhile (i < dataLayer.length) {\n if (dataLayer[i].page) {\n return dataLayer[i].page.type === 'search';\n }\n i++;\n}\n})();"}]]}},"els":{"blank_site_element":""},"vars":[{"name":"logged_in","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"(function() {\n var i = 0;\n while(i < dataLayer.length) {\n if (dataLayer[i].loggedInState) {\n return true;\n }\n i++;\n }\n return false;\n})();","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":"(function() {\n if(bouncex.website.pts === 'checkout') {\n var count = 0;\n jQuery('.order-summary-sidebar .qty-card-quantity-count').each(function() {\n count += Number(jQuery(this).text().trim()) || 0;\n });\n return count;\n }\n return Number(jQuery('.minicart-quantity').eq(0).text());\n})();","trigger":""},{"name":"cart_value","polling":"all","persist":"visit","page_types":[],"testmode":false,"default":"0","code":"(function(){\n if (bouncex.website.pts !== 'checkout' && Number(jQuery('.minicart-quantity').first().text().replace(/[^0-9.]/g, '')) === 0) {\n return 0;\n }\n return Number(jQuery('.sub-total').first().text().replace(/\\./g, ',').replace(',', '.').replace(/[^0-9.]/g, '')) || null;\n})();","trigger":""},{"name":"prod_price","polling":"all","persist":"no","page_types":["product"],"testmode":false,"default":"false","code":"Number(jQuery('.prices .sales .value').eq(0).text().replace(/\\./g, ',').replace(',', '.').replace(/[^0-9.]/g, ''));","trigger":""},{"name":"prod_name","polling":"all","persist":"no","page_types":["product"],"testmode":false,"default":"false","code":"jQuery('h1.product-name').eq(0).text().trim();","trigger":""},{"name":"in_stock","polling":"none","persist":"no","page_types":[],"testmode":true,"default":"false","code":"","trigger":""},{"name":"submitted_onsite","polling":"all","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"jQuery('.email-description, .modal-content').text().toLowerCase().includes('thank you') || null;","trigger":""},{"name":"page_url","polling":"none","persist":"no","page_types":["category","search"],"testmode":true,"default":"false","code":"","trigger":""},{"name":"cart_token","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"cart_items","polling":"none","persist":"no","page_types":[],"testmode":true,"default":"false","code":"null;","trigger":"pageload"},{"name":"cart","polling":"none","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"cookie_modal_present","polling":"all","persist":"no","page_types":[],"testmode":true,"default":"false","code":"null;","trigger":"pageload"},{"name":"page_type","polling":"none","persist":"no","page_types":[],"testmode":true,"default":"false","code":"bouncex.website.pts;","trigger":"pageload"},{"name":"attentive_visible","polling":"all","persist":"no","page_types":[],"testmode":true,"default":"false","code":"jQuery('#attentive_overlay').length > 0;","trigger":"pageload"},{"name":"logged_in_identified","polling":"none","persist":"no","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_id":"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"],"fme":true,"fmx":"#giftemail, #giftemailconfirm","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":"283039675","ga4_measurement_id":"G-LBHS1GXQ53","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":"07d5b82cf97935025a59bf55f6552b1c","creativesBaseStyles":"a53944a2","gpsAuction":"0aafcb326e2e52aae2936349578031e7","inbox":"02aca5df0e176b8810a86da97ac05424","onsite":"0e56ab6ba004ee080ce3deb3edae35e9","sms":"e39203556bab2366e56296ce42e974a7","websdk":"437a9f1c542faaacb49577b266dc4d73"}; 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_efcf4183cfe60de21aa43976b713ebd6.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(); }})();