(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":3786,"name":"Weight Watchers","cookie_name":"bounceClientVisit3786","domain":"weightwatchers.comus","ct":"fp_local_storage","ally":0,"ei":0,"tcjs":"","cjs":"bouncex.on(jQuery('button:contains(\"Continue with this plan\")'), 'click', function() {\n var $cartValue = Number(jQuery(this).parents('ww-plan-details[class*=\"plan-details\"], .plan-tile').find('.price-total').text().replace(/[^0-9.]/g, ''));\n\tbouncex.setv('cart_value', $cartValue);\n\tbouncex.setBounceCookie();\n});","force_https":false,"waypoints":false,"content_width":900,"gai":"UA-90306905-12","swids":"","sd":0,"ljq":"auto","campaign_id":0,"is_preview":false,"aco":{"first_party_limit":"3500","local_storage":"1"},"cmp":{"gdpr":1,"gmp":0,"whitelist_check":0},"burls":[],"ple":false,"fbe":false,"ffs":"","mas":2,"map":1,"gar":true,"ete":1,"ettm":false,"etjs":"var DOMAIN = 'www.weightwatchers.com',\n CLINICDOMAIN = 'clinic.weightwatchers.com',\n TEST_MODE = false,\n LOGGED_IN_PATH = '/r/cms',\n IS_MEMBER = 'is_member',\n ALLOWED_PARAMS = [\n 'channelId',\n 'sponsorId',\n 'promotionId',\n 'locationId'\n ],\n events = {\n 'view_plans' : {\n paths : [\n buildPath('/us/plans'),\n buildPath('/us/recipe')\n ],\n },\n 'view_price' : {\n paths : [\n buildPath('/checkout/plan'),\n buildPath('/us/signup/a/checkout'),\n buildPath('/us/signup/r/payment'),\n // /us/signup/r/payment\n buildPath('/us/signup/a/user-account'),\n buildPath('/us/signup/r/user-account')\n ],\n metaData : {\n 'url' : getCurrentUrl()\n }\n },\n IS_MEMBER : {\n paths : [\n buildPath('/checkout/payment'),\n ],\n callBack : function() {\n setVarAndCookie('logged_in_ibx', true);\n return;\n }\n }\n },\n determineTestMode = makeToggleCheck(TEST_MODE, bouncex.testmode.bxdev);\n\n/********************************** HELPERS ***********************************/\n\n// returns a bool based on a toggle set in above vars\nfunction makeToggleCheck(constantBool, conditionValue) {\n if (constantBool) {\n return !!conditionValue;\n }\n\n return true;\n}\n\nfunction buildPath(path) {\n return window.location.protocol + '//' + DOMAIN + path;\n}\n\nfunction getCurrentUrl() {\n return bouncex.utils.url.allowParams(ALLOWED_PARAMS);\n}\n\nfunction isValidDomain() {\n return getCurrentUrl().indexOf(DOMAIN) > -1;\n}\n\nfunction isClinicPage() {\n return (\n getCurrentUrl().indexOf(CLINICDOMAIN) > -1\n || window.da_site_section === 'clinic'\n || window.da_site_section === 'clinical'\n );\n}\n\nfunction isQuizFlow() {\n return getCurrentUrl().indexOf('personalassessment') > -1;\n}\n\nfunction setVarAndCookie(varName, value) {\n bouncex.setVar(varName, value);\n bouncex.setBounceCookie();\n return;\n}\n\n/****************************** INITIALIZE EVENTS *****************************/\n\nfunction initializeEvents(events) {\n var url = getCurrentUrl(),\n eventName = '',\n metaData = {},\n event = {};\n\n for (var currentName in events) {\n var currentEvent = events[currentName],\n i = 0;\n\n // Check the path root for each event, break when found\n for (i; i < currentEvent.paths.length; i++) {\n var currentPath = currentEvent.paths[i];\n if (url.indexOf(currentPath) > -1) {\n eventName = currentName;\n break;\n }\n }\n }\n\n if (eventName) {\n event = events[eventName];\n metaData = event.metaData || metaData;\n bouncex.push([eventName, metaData]);\n if (\n event.callBack\n && typeof event.callBack === 'function'\n ) {\n event.callBack();\n }\n }\n return;\n}\n\nfunction fireIsMember() {\n if (!bouncex.vars.logged_in_ibx) {\n bouncex.push([IS_MEMBER]);\n setVarAndCookie('logged_in_ibx', true);\n }\n return;\n}\n\nfunction fireClinicPage() {\n bouncex.push(['clinic_page', {}]);\n return;\n}\n\nfunction hasEverBeenMember() {\n return (\n bouncex.vars.ever_logged_in\n || bouncex.vars.ucrm_customer\n || bouncex.vars.logged_in\n || getCurrentUrl().indexOf(LOGGED_IN_PATH ) > -1\n );\n}\n\nfunction trackCustomEcapCancelSend() {\n bouncex.et.onVisible('#bx-step-1276007-8', function(){\n // bouncex.log('ecap submit step visible');\n bouncex.push(['custom_ecap_cancel_send', {}]);\n });\n if (bouncex.vars.b2bpage) {\n bouncex.push(['wwhs_ineligible', {}]);\n }\n}\n\nfunction initializeTrackingSiteWide() {\n trackCustomEcapCancelSend();\n\n if (hasEverBeenMember()) {\n fireIsMember();\n return;\n }\n // only run events if we have not fired `is_member` and\n // the user has never logged in with this cookie\n if (!bouncex.vars.logged_in_ibx) {\n initializeEvents(events);\n bouncex.et.onVarChange(\n 'logged_in',\n function() {\n if (bouncex.vars.logged_in) {\n fireIsMember();\n }\n\n return;\n }\n );\n bouncex.et.onVarChange(\n 'ucrm_customer' ,\n function() {\n if (bouncex.vars.ucrm_customer) {\n fireIsMember();\n }\n return;\n }\n );\n }\n return;\n}\n\n/************************* INITIALIZE EVENTS SITEWIDE *************************/\n\nfunction init() {\n if (isValidDomain() && determineTestMode) {\n initializeTrackingSiteWide();\n }\n\n if (isClinicPage() && !isQuizFlow()) {\n fireClinicPage();\n }\n\n return;\n}\n\ninit();","dge":true,"bxidLoadFirst":false,"pie":true,"cme":true,"gbi_enabled":0,"bpush":false,"pt":{"cart":{"testmode":true,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":""}]]},"category":{"testmode":true,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":""}]]},"checkout":{"testmode":false,"val":[[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/checkout/"}]]},"home":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"document.querySelectorAll('link[rel=\"canonical\"][href=\"https://www.weightwatchers.com/us/\"]').length > 0;"}]]},"product":{"testmode":false,"val":[[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/plans/"}]]},"search":{"testmode":true,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":""}]]}},"els":{"CART - Checkout Button":"","CART - Promo Code Apply Button":"","CART - Promo Code Box":"","CAT - Product Grid Image":"","CAT - Quickview Box":"","CAT-AddtoCartButton":"","CAT-QuickviewAddtoCart":"","Footer":"","Navigation bar":"","PDP - Add to Cart Button":"","PDP - Color Option":"","PDP - Hero Image":"","PDP - Product Name":"","PDP - Product Price":"","PDP - Quantity Option":"","PDP - Review Stars":"","PDP - Size Option":"","PDP - Thumbnail Image":"","SEARCH - Product Grid Image":""},"vars":[{"name":"logged_in","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"jQuery('.logout-container:contains(\"Logout\")').length > 0;","trigger":""},{"name":"ever_logged_in","polling":"all","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":true,"default":"0","code":"(function() {\n if (bouncex.website.pts === 'checkout') {\n return 1;\n }\n return 0;\n})();","trigger":""},{"name":"cart_value","polling":"all","persist":"visit","page_types":[],"testmode":true,"default":"0","code":"Number(jQuery('.price-details-container.open .price-total .plan-detail-price').text().replace(/[^0-9.]/g, ''));","trigger":""},{"name":"prod_price","polling":"all","persist":"no","page_types":[],"testmode":true,"default":"0","code":"bouncex.website.pts === 'product' && Number(jQuery('li.active .js-ww-price').eq(0).text().replace(/[^0-9.]/g, ''));","trigger":""},{"name":"prod_name","polling":"all","persist":"no","page_types":[],"testmode":true,"default":"false","code":"bouncex.website.pts === 'product' && jQuery('li.active .tab-pricing__title').eq(0).text().trim();","trigger":""},{"name":"in_stock","polling":"none","persist":"no","page_types":[],"testmode":true,"default":"false","code":"null;","trigger":""},{"name":"submitted_onsite","polling":"all","persist":"permanent","page_types":[],"testmode":true,"default":"false","code":"jQuery('li[id*=email-capture]:visible:contains(\"Subscription Confirmed\")').length > 0;","trigger":""},{"name":"page_url","polling":"none","persist":"no","page_types":["category","search"],"testmode":true,"default":"false","code":"","trigger":""},{"name":"logged_in_ibx","polling":"none","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"homepage","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"document.querySelectorAll('link[rel=\"canonical\"][href=\"https://www.weightwatchers.com/us/\"]').length > 0;","trigger":"pageload"},{"name":"duplicate_email","polling":"vars","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"jQuery('.bx-vtext:contains(already subscribed):visible').length > 0 || null;","trigger":"pageload"},{"name":"submitted_oncampaign","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"page_category","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"bouncex.utils.getNestedProp('window.digital_data.page_category') || false;","trigger":"pageload"},{"name":"sus1_segment","polling":"all","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"(function(){\n if (jQuery('.WNKD_V0_Digital').length > 0 || jQuery('.WNKD_V0_D360').length > 0 || jQuery('.WNKD_V0_Workshops').length > 0) {\n return 'control';\n }\n if (jQuery('.WNKD_V1_Digital').length > 0) {\n return 'v1_digital';\n }\n if (jQuery('.WNKD_V1_D360').length > 0) {\n return 'v1_d360';\n }\n if (jQuery('.WNKD_V1_Workshops').length > 0) {\n return 'v1_workshops';\n }\n if (jQuery('.WNKD_V2_Digital').length > 0) {\n return 'v2_digital';\n }\n if (jQuery('.WNKD_V2_D360').length > 0) {\n return 'v2_d360';\n }\n if (jQuery('.WNKD_V2_Workshops').length > 0) {\n return 'v2_workshops';\n }\n return false;\n})();","trigger":"pageload"},{"name":"submitted_email_this_visit","polling":"none","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"optimizely_suppression","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"jQuery('.mastheadtest_nocountdown').length > 0;","trigger":"pageload"},{"name":"suppress_overlays","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"jQuery('.hideWNDK').length > 0;","trigger":"pageload"},{"name":"client_id","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"bouncex.utils.url.getParam(\"id\", jQuery(\"[href*='id=']\").attr(\"href\")) || false;","trigger":"pageload"},{"name":"generic_countdownbanner","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"jQuery('[class*=FootnoteSlice]').find('p').text().trim().toLowerCase() === 'showcount';","trigger":"pageload"},{"name":"is_eligible_partner","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"(function(){\n if (!bouncex.vars.client_id) { \n return null;\n }\n \n var eligiblePartnerIDs = [\n 11612222,\n 63306,\n 15066302,\n 15066304,\n 8400,\n 63219,\n 17236,\n 13255015,\n 63665,\n 10906742,\n 11256025,\n 11380522,\n 15911,\n 14558334\n ];\n \n return eligiblePartnerIDs.indexOf(bouncex.vars.client_id) > -1;\n})();","trigger":"pageload"},{"name":"b2bpage","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"bouncex.utils.getNestedProp('digital_data.page_category') === 'landing_wwhs';","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":null,"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":"","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 WeightWatchers mktg txts (like cart reminders) to this #, per terms.","eventSharing":true,"shqId":"zc3n5ltz05-1","enabled":0},"pde":true,"fmc":["US","CA"],"fme":true,"fmx":"","uid2":false,"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":"","ga4_measurement_id":"","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_3786":"6d18ad4d30e9f338b0aaa6512d9d8df6"}; 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_d7b0fca1cd70aea2e78751a2d6884b66.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); } 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(); }})();