BLACK FRIDAY DISCOUNTS

@media (max-width:767px){.elementor-section:has(#mysa-test)>.elementor-container,.elementor-section:has(#mysa-test),.elementor-column:has(#mysa-test)>.elementor-widget-wrap{padding-left:0!important;padding-right:0!important}#mysa-test{padding-left:16px;padding-right:16px}}#mysa-test .mt-btn{white-space:normal!important;overflow-wrap:anywhere;line-height:1.3}#mysa-test .mt-btn.mt-btn-zona,#mysa-test .mt-btn.mt-btn-cerca{text-align:left} #mysa-test{ --mysa-verde:#234B46; --mysa-arancio:#FF9900; --mysa-giallo:#FFD814; --mysa-testo:#181818; --mysa-fondo:#F4F4F4; --mysa-lime:#ACC64A; --mt-font-titoli:'Josefin Sans', Georgia, serif; --mt-font-testo:'Karla', -apple-system, 'Segoe UI', sans-serif; font-family:var(--mt-font-testo); color:var(--mysa-testo); background:#fff; max-width:640px; margin:0 auto; padding:28px 20px 40px; border-radius:18px; box-shadow:0 10px 40px rgba(24,24,24,.08); box-sizing:border-box; min-height:560px; position:relative; font-size:16px; line-height:1.45; } #mysa-test *{box-sizing:border-box} #mysa-test button{font-family:inherit;cursor:pointer} #mysa-test :focus-visible{outline:3px solid var(--mysa-lime);outline-offset:2px;border-radius:12px} #mysa-test .mt-dots{display:flex;gap:6px;justify-content:center;margin:0 0 22px;min-height:4px} #mysa-test .mt-dots span{width:44px;height:4px;border-radius:2px;background:#E6E6E6;transition:background .25s} #mysa-test .mt-dots span.on{background:var(--mysa-verde)} #mysa-test .mt-screen{display:none} #mysa-test .mt-screen.active{display:block;animation:mt-in .35s cubic-bezier(.2,.7,.2,1)} @keyframes mt-in{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}} @media (prefers-reduced-motion:reduce){#mysa-test .mt-screen.active{animation:none}} #mysa-test h1,#mysa-test h2,#mysa-test h3{font-family:var(--mt-font-titoli);color:var(--mysa-verde);margin:0 0 8px;font-weight:400;line-height:1.15;text-wrap:balance} #mysa-test h1{font-size:36px;font-weight:300;color:var(--mysa-testo);letter-spacing:.01em} #mysa-test h2{font-size:26px} #mysa-test .mt-sub{font-size:17px;margin:0 0 24px;color:var(--mysa-testo)} #mysa-test .mt-btn{ display:flex;align-items:center;justify-content:center;gap:12px;width:100%; min-height:54px;padding:12px 20px;border:none;border-radius:12px; background:var(--mysa-verde);color:#fff;font-size:16px;font-weight:700;letter-spacing:.02em; box-shadow:0 6px 16px rgba(35,75,70,.22); transition:filter .15s, transform .08s, box-shadow .15s; } #mysa-test .mt-btn:hover{filter:brightness(1.06);box-shadow:0 8px 20px rgba(35,75,70,.28)} #mysa-test .mt-btn:active{transform:scale(.97)} #mysa-test .mt-btn:disabled{opacity:.4;cursor:default;transform:none} #mysa-test .mt-btn.mt-btn-zona{justify-content:flex-start;background:#fff;color:var(--mysa-testo);border:1.5px solid #E6E6E6;box-shadow:none;font-size:16px;font-weight:500;letter-spacing:0;min-height:52px;transition:border-color .15s, background .15s, transform .08s} #mysa-test .mt-btn.mt-btn-zona::before{content:'';width:18px;height:18px;border-radius:50%;border:2px solid #CFCFCF;margin-left:auto;order:9;flex:none;transition:all .15s} #mysa-test .mt-btn.mt-btn-zona:hover{border-color:var(--mysa-verde);background:#FAFCF4;filter:none;box-shadow:none} #mysa-test .mt-btn.mt-btn-zona svg{flex:none;color:var(--mysa-verde)} #mysa-test .mt-btn.mt-btn-zona[aria-pressed="true"]{background:#F3F8EA;color:var(--mysa-testo);border:1.5px solid var(--mysa-verde)} #mysa-test .mt-btn.mt-btn-zona[aria-pressed="true"]::before{border-color:var(--mysa-verde);background:radial-gradient(circle,var(--mysa-verde) 0 5px,#fff 6px)} #mysa-test .mt-btn.mt-btn-zona[aria-pressed="true"] svg{color:var(--mysa-verde)} #mysa-test .mt-btn.mt-btn-sec{background:#fff;color:var(--mysa-verde);border:1.5px solid var(--mysa-verde);box-shadow:none} #mysa-test .mt-btn.mt-btn-sec:hover{background:var(--mysa-fondo);filter:none} #mysa-test .mt-seg{display:inline-flex;gap:0;margin:0 0 8px;background:#EEF0EC;border-radius:999px;padding:3px} #mysa-test .mt-back{background:none;border:none;padding:0;margin:0 0 14px;color:var(--mysa-verde);font-family:var(--mt-font-testo);font-size:15px;font-weight:700;cursor:pointer;display:inline-flex;align-items:center;gap:4px} #mysa-test .mt-back:hover{text-decoration:underline} #mysa-test .mt-seg-b{min-width:88px;min-height:36px;border-radius:999px;background:transparent;border:none;font-size:13px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:#6B6B6B;display:flex;align-items:center;justify-content:center;gap:6px;padding:0 16px;transition:all .15s} #mysa-test .mt-seg-b:hover{color:var(--mysa-verde)} #mysa-test .mt-seg-b[aria-pressed="true"]{background:#fff;color:var(--mysa-verde);box-shadow:0 1px 4px rgba(0,0,0,.12)} #mysa-test .mt-seg-diff{font-size:13px;color:#6B6B6B;margin:0 0 14px} #mysa-test .mt-col{display:flex;flex-direction:column;gap:10px} #mysa-test .mt-btn.mt-btn-cerca{justify-content:flex-start;background:#fff;color:var(--mysa-verde);border:1.5px solid var(--mysa-verde);font-size:17px;box-shadow:0 2px 6px rgba(4,82,61,.08)} #mysa-test .mt-btn.mt-btn-cerca:hover{background:var(--mysa-fondo);filter:none} #mysa-test .mt-btn.mt-btn-cerca svg{flex:none} #mysa-test .mt-s1-row{display:flex;flex-direction:column;gap:12px;align-items:center} #mysa-test .mt-s1-row .mt-col{flex:1;width:100%} #mysa-test .mt-figwrap{flex:none;width:56px} @media (min-width:480px){#mysa-test{padding:36px 40px 48px}#mysa-test .mt-s1-row{flex-direction:row;align-items:flex-start;gap:20px}#mysa-test .mt-figwrap{width:96px;position:sticky;top:12px}} #mysa-test .mt-figure{display:block;width:100%} #mysa-test .mt-figure .fz{fill:#E9E9E9;transition:fill .3s cubic-bezier(.2,.7,.2,1)} #mysa-test .mt-figure .fz.hot{fill:var(--mysa-verde)} #mysa-test .mt-figure .fm{fill:var(--mysa-verde);opacity:0;transition:opacity .3s cubic-bezier(.2,.7,.2,1)} #mysa-test .mt-figure .fm.hot{opacity:1} #mysa-test .mt-link{background:none;border:none;color:var(--mysa-verde);font-size:16px;text-decoration:underline;text-underline-offset:3px;padding:8px 4px;display:inline-block} #mysa-test a{color:var(--mysa-verde)} #mysa-test a:hover{text-decoration-color:var(--mysa-lime)} #mysa-test .mt-apri{font-size:18px;font-weight:700;margin:0 0 20px} #mysa-test .mt-card{background:#fff;border:1px solid #ECECEC;border-radius:16px;box-shadow:0 8px 24px rgba(24,24,24,.06);padding:22px;margin-bottom:16px;position:relative} #mysa-test .mt-tag{display:inline-block;font-family:var(--mt-font-titoli);font-weight:600;font-size:11px;letter-spacing:.14em;text-transform:uppercase;color:var(--mysa-verde);background:#F3F8EA;border-radius:999px;padding:6px 12px;margin:0 0 12px} #mysa-test .mt-card .mt-foto{width:100%;max-width:200px;margin-left:auto;margin-right:auto;aspect-ratio:1/1;border-radius:12px;background:#fff;display:flex;align-items:center;justify-content:center;color:var(--mysa-verde);font-family:var(--mt-font-titoli);font-size:15px;letter-spacing:.05em;text-transform:uppercase;margin-bottom:14px;overflow:hidden} #mysa-test .mt-card .mt-foto img{width:100%;height:100%;object-fit:contain;background:#fff} #mysa-test .mt-card h3{font-size:26px;font-weight:300;color:var(--mysa-testo);margin-bottom:4px;letter-spacing:.01em} #mysa-test .mt-card .mt-perche{margin:0 0 12px;color:#4B4B4B;font-size:15px;line-height:1.5} #mysa-test .mt-card .mt-prezzo{font-family:var(--mt-font-testo);font-weight:800;font-size:26px;color:var(--mysa-verde);margin:0 0 12px} #mysa-test .mt-card .mt-prezzo b{color:var(--mysa-lime);-webkit-text-stroke:.4px var(--mysa-verde)} #mysa-test .mt-prezzo-row{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:0 0 12px} #mysa-test .mt-prezzo-row .mt-prezzo{margin:0} #mysa-test .mt-prezzo .mt-now{display:inline-block;animation:mt-pulse 1.6s ease-in-out infinite;transform-origin:left center} @keyframes mt-pulse{0%,100%{transform:scale(1)}50%{transform:scale(1.06)}} #mysa-test .ocd-slim{color:#fff;border-radius:6px;padding:6px 10px;display:inline-flex;align-items:center;justify-content:center;gap:6px;line-height:1;font-weight:500;font-size:12px;margin:0;background:#C8102E;font-family:var(--mt-font-testo)} #mysa-test .ocd-label{opacity:.85;white-space:nowrap} #mysa-test .ocd-time{font-weight:700;letter-spacing:.3px;font-variant-numeric:tabular-nums;white-space:nowrap} @media (max-width:480px){#mysa-test .ocd-slim{font-size:11px;padding:5px 8px}} @media (prefers-reduced-motion:reduce){#mysa-test .mt-prezzo .mt-now{animation:none}} #mysa-test .mt-rec{border-top:1px solid #EFEFEF;margin-top:16px;padding-top:12px;font-size:15px;color:#4B4B4B;font-style:italic} #mysa-test .mt-rec b{font-style:normal;font-weight:600} #mysa-test .mt-rec b{color:var(--mysa-testo)} #mysa-test .mt-second-title{font-family:var(--mt-font-titoli);font-weight:600;font-size:16px;text-transform:uppercase;letter-spacing:.05em;color:var(--mysa-verde);margin:26px 0 10px} #mysa-test .mt-card.small{padding:16px} #mysa-test .mt-card.small .mt-foto{aspect-ratio:1/1;max-width:140px;margin-left:auto;margin-right:auto} #mysa-test .mt-card.small h3{font-size:20px} #mysa-test .mt-nota{font-size:15px;color:#4B584F;margin:4px 0 0} #mysa-test .mt-linea-link{margin:22px 0 6px;font-size:16px} #mysa-test .mt-wait{padding:32px 0 24px} #mysa-test .mt-wline{display:block;width:fit-content;margin:0 0 10px;opacity:0;transform:translateY(6px);transition:opacity .4s cubic-bezier(.2,.7,.2,1),transform .4s cubic-bezier(.2,.7,.2,1)} #mysa-test .mt-wline.show{opacity:1;transform:none} @media (prefers-reduced-motion:reduce){#mysa-test .mt-wline{transition:opacity .2s}} #mysa-test .mt-scheda{background:#fff;border:none;border-radius:0;box-shadow:none;padding:0;margin-bottom:18px} #mysa-test .mt-scheda .mt-card{background:#fff} #mysa-test .mt-scheda-head{display:flex;gap:14px;align-items:flex-start;justify-content:space-between;border-bottom:1px solid #EFEFEF;padding-bottom:18px;margin-bottom:20px} #mysa-test .mt-scheda-kicker{font-family:var(--mt-font-titoli);font-weight:600;font-size:12px;text-transform:uppercase;letter-spacing:.14em;color:var(--mysa-lime);margin:0 0 6px} #mysa-test .mt-scheda-title{font-size:30px;font-weight:300;color:var(--mysa-testo);margin:0 0 6px} #mysa-test .mt-scheda-meta{font-size:15px;color:#6B6B6B;margin:0} #mysa-test .mt-fig-small{flex:none;width:40px} #mysa-test .mt-firma{border-top:1px solid #EFEFEF;margin:24px 0 0;padding-top:16px;font-size:15px;color:#6B6B6B} #mysa-test .mt-firma .mt-sign{display:block;font-family:'Segoe Script','Brush Script MT','Snell Roundhand',cursive;font-size:22px;color:var(--mysa-verde);margin-top:2px} #mysa-test .mt-consulente{display:flex;gap:14px;align-items:center;background:#F6F7F4;border-radius:16px;padding:16px;margin-top:16px} #mysa-test .mt-cons-foto{flex:none;width:56px;height:56px;border-radius:50%;background:var(--mysa-verde);color:#fff;display:flex;align-items:center;justify-content:center;font-family:var(--mt-font-titoli);font-size:24px;overflow:hidden} #mysa-test .mt-cons-foto img{width:100%;height:100%;object-fit:cover} #mysa-test .mt-consulente b{font-size:16px} #mysa-test .mt-consulente p{margin:2px 0 10px;font-size:15px} #mysa-test .mt-consulente .mt-btn{width:auto;min-height:48px;padding:10px 18px;font-size:16px;text-decoration:none} #mysa-test .mt-chat{display:flex;gap:10px;align-items:flex-start;margin:0 0 18px} #mysa-test .mt-avatar{flex:none;width:48px;height:48px;border-radius:50%;overflow:hidden;background:#fff;border:2px solid #fff;box-shadow:0 2px 8px rgba(24,24,24,.15)} #mysa-test .mt-avatar img,#mysa-test .mt-avatar svg{width:100%;height:100%;display:block;object-fit:cover} #mysa-test .mt-avatar.big{width:112px;height:112px;margin:0 auto 18px;border-width:3px;box-shadow:0 6px 18px rgba(24,24,24,.14)} #mysa-test .mt-bolla{background:#F6F7F4;border:none;border-radius:16px;border-top-left-radius:4px;padding:14px 16px;font-size:16px;line-height:1.5;box-shadow:none} #mysa-test .mt-bolla b{color:var(--mysa-verde)} #mysa-test .mt-q{font-family:var(--mt-font-testo);font-size:17px;font-weight:700;color:var(--mysa-testo);margin:0;line-height:1.4} #mysa-test .mt-s0{text-align:center;padding:28px 0 20px} #mysa-test .mt-s0 .mt-sub{margin-bottom:24px} #mysa-test .mt-s0 .mt-btn{max-width:280px;margin:0 auto} #mysa-test .mt-typing{display:inline-flex;gap:4px;padding:4px 2px} #mysa-test .mt-typing span{width:7px;height:7px;border-radius:50%;background:var(--mysa-verde);opacity:.3;animation:mt-typ 1s infinite} #mysa-test .mt-typing span:nth-child(2){animation-delay:.2s} #mysa-test .mt-typing span:nth-child(3){animation-delay:.4s} @keyframes mt-typ{0%,100%{opacity:.3}50%{opacity:1}} /* --- pannello disturbi (bottom sheet) --- */ #mysa-test .mt-sheet-scrim{position:fixed;inset:0;background:rgba(34,48,43,.45);z-index:98;display:none} #mysa-test .mt-sheet{position:fixed;left:0;right:0;bottom:0;z-index:99;background:var(--mysa-fondo);border-radius:20px 20px 0 0;max-height:78vh;overflow-y:auto;padding:20px 20px 32px;display:none;box-shadow:0 -8px 30px rgba(4,82,61,.2)} @media (min-width:640px){#mysa-test .mt-sheet{left:50%;transform:translateX(-50%);max-width:560px;border-radius:20px;bottom:5vh}} #mysa-test .mt-sheet.open,#mysa-test .mt-sheet-scrim.open{display:block} #mysa-test .mt-sheet h3{font-size:20px;margin-bottom:2px} #mysa-test .mt-sheet .mt-grp{font-family:var(--mt-font-titoli);font-weight:600;font-size:15px;text-transform:uppercase;letter-spacing:.06em;color:var(--mysa-verde);margin:18px 0 6px} #mysa-test .mt-sheet .mt-d{display:block;width:100%;text-align:left;background:#fff;border:1px solid #E2DCCE;border-radius:10px;padding:12px 14px;font-size:16px;color:var(--mysa-testo);margin-bottom:6px} #mysa-test .mt-sheet .mt-d:hover{border-color:var(--mysa-verde)} #mysa-test .mt-sheet .mt-d[aria-pressed="true"]{background:rgba(4,82,61,.1);border:2px solid var(--mysa-verde);padding:11px 13px} #mysa-test .mt-sheet .mt-d[aria-pressed="true"]::after{content:'\2713';float:right;color:var(--mysa-verde);font-weight:700} #mysa-test .mt-sheet-close{position:sticky;top:0;float:right;background:none;border:none;font-size:26px;line-height:1;color:var(--mysa-verde);padding:4px 8px}

Welcome to the Mysa test

Preparing your result

Your result

Got it!

Why choose Mysa

✔ Registered medical device (CE Class I)
✔ Clinically tested: approved by a European university clinical study
✔ If it doesn’t work, you don’t pay: 30-day money-back guarantee

See you soon,Annika

Luca ● online Luca - online advisor

(function(){ 'use strict'; /* ============================================================ 1. TRACKING — collega qui il tuo pixel. Viene chiamata a ogni scelta e al risultato finale. ============================================================ */ /* Al pixel arrivano SOLO questi eventi, e solo con il nome del prodotto: le zone scelte non vengono mai inviate. */ var TRACK_OK = { test_avviato:1, risultato:1, whatsapp:1 }; function track(evento, dati){ if(!TRACK_OK[evento]) return; /* es. fbq('trackCustom', 'TestMysa_'+evento, dati); */ } /* ============================================================ 3. DATI — nomi, prezzi, URL, testi. Modifica tutto qui. ============================================================ */ var LINEE = { agopressione: { nome:'Linea Agopressione', url:'#' }, sonno: { nome:'Linea Sonno', url:'#' }, gambe: { nome:'Linea Gambe', url:'#' } }; /* Consulente: nome, numero WhatsApp (internazionale senza +) e avatar. foto = URL dell'immagine (foto vera o illustrazione); vuota = segnaposto lineare disegnato. */ var CONSULENTE = { nome:'Annika', consulente:'Luca', whatsapp:'393423635755', foto:'https://mysa.it/wp-content/uploads/2026/09/annika.png' }; /* Codice sconto legato al test */ /* */ var TESTI = { introTitolo:"Hi, I’m Annika!", intro:"Tell me what hurts and I’ll tell you the right Mysa for you!", iniziamo:"Let’s start", d1:"So tell me: what would you like to fix first of all?", linkElenco:"Can’t find your problem? Look for it in the list", d2:"OK, let’s start with {da}. Is there anything else bothering you?", d2b:"One last thing, because there are two different paths here. What would help you more?", attesaRicerca:"Let me look through our 9 products…", attesaTrovato:"Here it is! Found it.", consiglio:"You told me {cosa}. I’ve chosen {prodotto} for you. {spiega}", consiglioSecondo:"And for {zona} that you mentioned, I also recommend {prodotto}. {spiega}", consiglioSchiena:"For your back, I also suggest {prodotto}. {spiega}", whatsapp:"Still have a question? Write to us here and one of our advisors will reply right away.", waBtn:"Luca - online advisor", firma:"See you soon,", schedaKicker:"Got it!", schedaTitolo:"Here’s what would suit you perfectly", schedaSotto:"What lets you start solving your pain, starting tomorrow." }; /* Prezzi SEGNAPOSTO: aggiorna qui. Ogni coppia Base/Pro è definita una volta in COPPIE. */ var PRODOTTI = { cuscinoCV: { wcId:9079, nome:"Mysa Thermo Pillow", art:"the Mysa Thermo Pillow", linea:'agopressione', prezzo:"€59.90", prezzoListino:"€76", url:"https://www.mysa-mat.com/products/mysathermo-pillow-html/", img:"https://mysa.it/wp-content/uploads/2020/06/home.jpg", perche:"Targeted acupressure massage for neck and nape, against neck pain and tension", spiega:"it’s the pillow with Mysa 33-spike flowers and an organic spelt-husk filling: heat it in the microwave, place it under your neck and in 20 minutes acupressure and heat release the knots in your neck and shoulders. Against neck pain, stiff neck and tension headaches.", rec:"«Really useful: I used it three times and my back pain is gone. It works very well for neck pain too.»", recAutore:"Eugenia Hriscu" }, cuscinoCA: { wcId:9052, nome:"Mysa ThermoMag Pillow", art:"the Mysa ThermoMag Pillow", linea:'agopressione', prezzo:"€79.90", prezzoListino:"€98.90", url:"https://www.mysa-mat.com/products/mysa-thermomag-pillow-html/", img:"https://mysa.it/wp-content/uploads/2020/06/home-4.jpg", perche:"Acupressure plus magnets: a deeper pain-relieving action on neck and nape", spiega:"it’s the version of our heatable pillow with 8 bio-magnets: Mysa spikes, spelt husk and magnet therapy together, for the deepest action on neck pain, cervical hernia, stiff neck and headaches.", rec:"«It’s true, even when I have a headache it helps me a lot.»", recAutore:"Daniela Cominardi" }, ergonoB: { wcId:9013, nome:"ErgonoMysa", art:"the ErgonoMysa", linea:'agopressione', prezzo:"€109.90", prezzoListino:"€135", url:"https://www.mysa-mat.com/products/ergono-mysa-html/", img:"https://mysa.it/wp-content/uploads/2020/06/home-7.jpg", perche:"20 minutes a day: back pain melts away", spiega:"it’s the Mysa mat with the Hot ErgonoPad ergonomic corrector: heat it, place it under your lower back and the mat follows the curve of your spine. Acupressure and heat release muscle knots and relieve low back pain, herniated and degenerated discs, 20 minutes a day.", rec:"«I finally stopped taking painkillers: half an hour a day, consistently, and the pain has almost gone.»", recAutore:"Giovanna Tortoriello" }, ergonoMag: { wcId:8972, nome:"ErgonoMag Mysa", art:"the ErgonoMag Mysa", linea:'agopressione', prezzo:"€148.90", prezzoListino:"€168", url:"https://www.mysa-mat.com/products/ergonomag-mysa-html/", img:"https://mysa.it/wp-content/uploads/2020/06/home-10.jpg", perche:"Acupressure plus magnets: a deeper action against back pain", spiega:"it’s the ErgonoMysa with bio-magnets: the same heatable ergonomic corrector under the lower back, on the Magnetic Mysa mat. Acupressure, heat and magnet therapy for the deepest action on low back pain, herniated discs, disc disease and sciatica.", rec:"«Exceptional! My back is terrible because of scoliosis… I no longer know what pain is!»", recAutore:"Lucla Bondi" }, ergonoDuo: { wcId:8992, nome:"Ergono Mysa Duo", art:"the Ergono Mysa Duo", linea:'agopressione', prezzo:"€143.90", prezzoListino:"€212", url:"https://www.mysa-mat.com/products/ergono-mysa-duo-html/", img:"https://mysa.it/wp-content/uploads/2020/06/rimedi_mal_di_schiena_lombalgia_rimedi_naturali_mal_di_schiena_agopressione_23_.jpg", perche:"20 minutes a day: back, neck and tension melt away", spiega:"it’s the set with the heatable ergonomic mat and the Mysa Thermo Pillow: acupressure and heat from the lower back up to the neck, in the same session. For anyone with back pain and neck pain together.", rec:"«I suffer from back pain and the relief is immediate… Fantastic!»", recAutore:"Francesca Cucchi" }, superbooster: { wcId:8971, nome:"Mysa SuperBooster", art:"the Mysa SuperBooster", linea:'agopressione', prezzo:"€197.90", prezzoListino:"€248", url:"https://www.mysa-mat.com/products/mysa-superbooster-html/", img:"https://mysa.it/wp-content/uploads/2020/06/home-12.jpg", perche:"Acupressure, warmth and magnets: the best against back pain", spiega:"it’s our most complete set: Magnetic Mysa mat, ThermoMag pillow and heatable ergonomic corrector. Acupressure, heat and magnet therapy from the lower back to the neck: the strongest option against herniated discs, disc disease, low back pain and neck pain.", rec:"«I use it every evening before going to sleep… it really helps with back pain.»", recAutore:"Riccardo Antonietta" }, ergonoDuoXXL: { wcId:31428, nome:"ErgonoMysa Duo XXL", art:"the ErgonoMysa Duo XXL", linea:'agopressione', prezzo:"€198.90", prezzoListino:"€263.90", url:"https://www.mysa-mat.com/products/ergonomysa-duo-xxl/", img:"https://mysa.it/wp-content/uploads/2023/04/OK-SET-TAPPETINO-AGOPRESSIONE-XL-EXTRA-LUNGO-E-CUSCINO-THERMO-MYSA-DUO-XXL-1.jpg", perche:"The large format for the whole body: pain, tension and stress melt away", spiega:"it’s the longest Mysa mat, 150 cm, with the heatable neck pillow and the ergonomic corrector for the lower back: 180 cm in total, from neck to feet. Made for tall people with pain along the whole spine.", rec:"«After a day on my feet, with my back problems, it’s a godsend! I lie on it for 10 minutes and my muscles relax.»", recAutore:"Anna Castagna" }, superbXXL: { wcId:31583, nome:"Mysa SuperBooster XXL", art:"the Mysa SuperBooster XXL", linea:'agopressione', prezzo:"€278.90", prezzoListino:"€360", url:"https://www.mysa-mat.com/products/superbooster-xxl/", img:"https://mysa.it/wp-content/uploads/2023/04/SUPERBOOSTER-XXL-AKUPRESSURMATTE-XL-TAPIS-ACUPRESSION-XL-PRANAMAT-XL-TAPPETINO-MYSA-XL.jpg", perche:"Whole body, with warmth and magnets: the most complete action on pain and tension", spiega:"it’s our top of the range in XXL: 150 cm Magnetic Mysa, magnetic pillow and heatable corrector. Acupressure, heat and magnet therapy along the whole spine and the legs, against the most stubborn pain.", rec:"«Absolutely true, I can confirm it works: since I started using it my back problems…»", recAutore:"Luisa Stocco" }, thermoDuo: { wcId:9076, nome:"Thermo Mysa Duo", art:"the Thermo Mysa Duo", linea:'agopressione', prezzo:"€109.90", prezzoListino:"€160", url:"https://www.mysa-mat.com/products/thermo-mysa-duo-html/", img:"https://mysa.it/wp-content/uploads/2020/06/MYSA-AKUPRESSURMATTE-XXL-TAPPETINO-MYSA-XXL-TAPIS-MYSA-XXL-min-scaled.jpg", perche:"Mat and pillow together: back, neck and tension before bed", spiega:"it’s the mat and Mysa Thermo Pillow set: heat it, lie down in the evening and in 20 minutes acupressure and heat loosen your back and neck before sleep. Against back pain, neck pain and insomnia.", rec:"«When my back hurts I sleep on it and the next morning everything is fine… great purchase.»", recAutore:"Elisa Corazza" }, thermoMagDuo: { wcId:9027, nome:"Thermomag Mysa Duo", art:"the Thermomag Mysa Duo", linea:'agopressione', prezzo:"€164.90", prezzoListino:"€226", url:"https://www.mysa-mat.com/products/thermomag-mysa-duo-html/", img:"https://mysa.it/wp-content/uploads/2020/06/TAPPETINO-AGOPRESSIONE-CON-MAGNETI-TAPIS-AIMANTS-ACUPRESSION-AKUPRESSURMATTE-MAGNETENXXL-MYSA-min-scaled.jpg", perche:"Warmth and magnets together: the deepest evening ritual against pain and insomnia", spiega:"it’s the Thermo Mysa Duo with magnets: Magnetic Mysa mat and ThermoMag pillow. Acupressure, heat and magnet therapy along the whole spine, against sciatica, low back pain, neck pain and insomnia.", rec:"«After 20 minutes of trying it I couldn’t feel my sciatica any more.»", recAutore:"Alessandra Limido" }, extenderB: { wcId:15501, nome:"Mysa Back Extender", art:"the Mysa Back Extender", linea:'agopressione', prezzo:"€79.90", prezzoListino:"€89.90", url:"https://www.mysa-mat.com/products/mysa-back-extender/", img:"https://mysa.it/wp-content/uploads/2020/11/stretcher_lombare_es_iwvLb-scaled.jpg", perche:"Gentle spinal decompression, designed for herniated and degenerated discs", spiega:"it’s the Mysa spinal stretcher: lie on the arch 12 minutes a day, with the curve adjustable to the millimetre, and your spine lengthens, your discs decompress and the pressure from herniated and degenerated discs eases. With acupressure cover, heatable gel pad and trigger ball.", rec:"«I’ve had it for about two weeks and it has already worked miracles. Thank you Mysa.»", recAutore:"Rosaria Marino" }, extenderDuo: { wcId:21345, nome:"Mysa Extender Duo", art:"the Mysa Extender Duo", linea:'agopressione', prezzo:"€119.90", prezzoListino:"€144", url:"https://www.mysa-mat.com/products/extender-duo/", img:"https://mysa.it/wp-content/uploads/2021/08/stretcher_lombare_es_aN6C8-min.jpg", perche:"Decompression plus acupressure: the complete programme for your spine", spiega:"it’s the Back Extender together with the Mysa acupressure pillow: decompress your lower spine on the arch while the spikes work on your neck. The complete programme against herniated discs, disc disease, low back pain and neck pain.", rec:"«I’ve been using it for 4 years and I can’t do without it!»", recAutore:"Carla Sinoni" }, relevia: { wcId:67669, nome:"Mysa Relevia™", art:"the Mysa Relevia™", linea:'agopressione', prezzo:"€79.90", prezzoListino:"€119", url:"https://www.mysa-mat.com/products/mysa-relevia/", img:"https://mysa.it/wp-content/uploads/2026/09/mysa-cuscino-quadrato-sfondo-bianco-1024x1024.png", perche:"Supports your neck all night, in every position: no more waking up with a stiff neck", spiega:"it’s our pillow for the night: six zones designed to the millimetre support your neck in every position, so you wake up without a stiff neck and without pain in your shoulders and head.", rec:"«I work 9 hours at the computer and in the evening my neck was always wrecked. After a week I no longer felt it.»", recAutore:"Andrea C." }, originalXXL: { wcId:29347, nome:"Original Mysa XXL", art:"the Original Mysa XXL", linea:'agopressione', prezzo:"€119.90", prezzoListino:"€165", url:"https://www.mysa-mat.com/products/original-mysa-xxl-extra-long-acupressure-mat-xl-extra-large/", img:"https://mysa.it/wp-content/uploads/2022/12/Mysa_MGL9680-ORIGINAL-MYSA-XXL-LUNGO-XL-TAPPETINO-AGOPRESSIONE-AKUPRESSURMATTE-XL-TAPIS-ACUPRESSUR-OK.jpg", perche:"The extra-long mat: from shoulders to legs, against pain and heavy legs", spiega:"it’s the extra-long Mysa mat, 150 cm of 33-spike flowers: from neck to feet in a single session. Acupressure reactivates micro-circulation: against back pain, swollen heavy legs and cellulite.", rec:"«Ladies: against orange-peel skin it really works, it makes the skin more elastic.»", recAutore:"Ladi Oscar" }, magneticXXL: { wcId:30263, nome:"Magnetic Mysa XXL", art:"the Magnetic Mysa XXL", linea:'agopressione', prezzo:"€169.90", prezzoListino:"€275", url:"https://www.mysa-mat.com/products/aagnetic-mysa-xxl-the-longest-acupressure-mat-for-heights-and-bodies-with-magnets/", img:"https://mysa.it/wp-content/uploads/2023/03/MAGNETIC-MYSA-XXL-AKUPRESSURMATTE-XL-ACUPRESSION-XL.jpg", perche:"The extra-long mat with magnets: deeper action from shoulders to legs", spiega:"it’s the Original Mysa XXL with 32 bio-magnets: 150 cm of acupressure and magnet therapy from neck to feet, for the deepest action on back pain, heavy legs and micro-circulation.", rec:"«I bought it 3 years ago… fabulous! An incredible relaxing effect.»", recAutore:"Manuela Miari" }, ergonoXXL: { wcId:31584, nome:"ErgonoMysa XXL", art:"the ErgonoMysa XXL", linea:'agopressione', prezzo:"€168.90", prezzoListino:"€224", url:"https://www.mysa-mat.com/products/ergonomysa-xxl-original-mysa-mat-xxl-acupressuremat-xl-heatable-and-ergonomic/", img:"https://mysa.it/wp-content/uploads/2023/04/SENZA-CUSCINO-SET-TAPPETINO-AGOPRESSIONE-XL-EXTRA-LUNGO-E-CUSCINO-THERMO-MYSA-DUO-XXL.jpg", perche:"Extra-long, ergonomic and heatable: back and legs in one mat", spiega:"it’s the 150 cm Original Mysa XXL with the heatable ergonomic corrector: place it under your lower back against low back pain and herniated discs, or under thighs and calves to reactivate circulation in your legs.", rec:"«I’ve had it for 15 years now… never without it again.»", recAutore:"Carletta Carolina" }, thermoDuoXXL: { wcId:30178, nome:"Thermo Mysa Duo XXL", art:"the Thermo Mysa Duo XXL", linea:'agopressione', prezzo:"€165.90", prezzoListino:"€220", url:"https://www.mysa-mat.com/products/thermo-mysa-duo-mat-and-pillow-for-acupressure-longest-acupressure-mat-xl-mat-for-acupressure-extra-long-xl-and-pillow/", img:"https://mysa.it/wp-content/uploads/2023/02/THERMO-MYSA-DUO-AGOPRESSIONE-AKUPRESSURMATTE.jpg", perche:"The longest mat with the heatable pillow: 180 cm of relief from nape to feet", spiega:"it’s the 150 cm extra-long mat with the Mysa Thermo Pillow: acupressure from neck to feet and heat on the neck, against back pain, neck pain and heavy legs.", rec:"«Fantastic mat! I’ve been using it for 10 days against stress and insomnia.»", recAutore:"Claudia Taibez" }, thermoMagDuoXXL: { wcId:0, nome:"Thermo Mag Mysa Duo XXL", art:"the Thermo Mag Mysa Duo XXL", linea:'agopressione', prezzo:"€228.50", prezzoListino:"€325", url:"", img:"https://mysa.it/wp-content/uploads/2023/03/THERMOMAG-MYSA-DUO-XXL-AKUPRESSURMATTE-XL-TAPIS-ACUPRESSIONE-XL.jpg", perche:"The longest mat with heatable pillow and magnets: three natural therapies together", spiega:"it’s the XXL version with magnets: 150 cm Magnetic Mysa and ThermoMag pillow. Acupressure, heat and magnet therapy from neck to feet, against sciatica, low back pain, neck pain and swollen legs.", rec:"«After 20 minutes of trying it I couldn’t feel my sciatica any more.»", recAutore:"Alessandra Limido" }, ergonoMagXXL: { wcId:31586, nome:"ErgonoMag Mysa XXL", art:"the ErgonoMag Mysa XXL", linea:'agopressione', prezzo:"€229", prezzoListino:"€325", url:"https://www.mysa-mat.com/products/ergonomag-mysa-xxl-extra-long-acupressure-mat-heatable-ergonomic-with-magnets/", img:"https://mysa.it/wp-content/uploads/2023/04/ERGONOMAG-XXL-TAPPETINO-XL-AKUPRESSUR-AGOPRESSIONE-XL-LAUNGO.jpg", perche:"Extra-long, ergonomic, heatable and with magnets: back and legs together", spiega:"it’s the ErgonoMysa XXL with bio-magnets: 150 cm of acupressure and magnet therapy, with the heatable corrector for the lower back or the legs. Against herniated discs, disc disease, low back pain and heavy legs.", rec:"«Exceptional! My back is terrible because of scoliosis… I no longer know what pain is!»", recAutore:"Lucla Bondi" } }; /* Foto e prezzi letti in tempo reale dal sito (immagine di copertina WooCommerce). Se cambi la copertina di un prodotto, cambia anche qui. I valori scritti sopra restano come riserva. */ (function(){ function eur(cents,mu){ var v=parseInt(cents,10)/Math.pow(10,mu||2); if(!isFinite(v)||v=0; }; var C = has('collo'), D = has('dormo'), S = has('schiena'), R = has('relax'); var legs = ['gambeLeggere','gambeStanche','pelle'].filter(has), L = legs.length>0; var q = st.q2b; // 'pillow' | 'massage' | null var punte = (C||D) && q==='massage'; // vuole il cuscino con le punte // 1. il tappetino (o il cuscino) principale var mat = null; if(R) mat = 'tappetinoXXL'; // ErgonoMysa Duo XXL / SuperBooster XXL else if(S && L) mat = punte ? 'tappetinoXXL' : 'schienaGambeXXL'; // ... / ErgonoMysa XXL - ErgonoMag XXL else if(L) mat = punte ? 'gambeCusXXL' : 'gambeXXL'; // Thermo Duo XXL / Original-Magnetic XXL else if(S) mat = punte ? 'tappetino' : 'tappetinoSolo'; // Ergono Duo-SuperBooster / ErgonoMysa-ErgonoMag else if(punte) mat = D ? 'setSerale' : 'cuscino'; // Thermo Duo / Thermo Cuscino // 2. il Relevia: solo con "cuscino per la notte" (o relax + dormire meglio, dove la domanda non c'è) var relevia = ((C||D) && q==='pillow') || (R && D); // 3. ordine: se la prima scelta è collo o notti e c'è il Relevia, il Relevia va per primo var zonaMat = R ? 'relax' : (S ? 'schiena' : (L ? legs[0] : (D ? 'dormo' : 'collo'))); var zonaRel = D ? 'dormo' : 'collo'; var main, second = null; if(relevia && (!mat || st.primary==='collo' || st.primary==='dormo')){ main = 'relevia'; if(mat) second = { prod:mat, riga:'', zona:zonaMat, label:(!R && !S && legs.length>1) ? 'your legs' : null }; } else { main = mat; if(relevia) second = { prod:'relevia', riga:'', zona:zonaRel }; } // 4. per la schiena c'è sempre anche il Back Extender var extra = S ? 'extender' : null; var ordine = ['collo','schiena','dormo','gambeLeggere','gambeStanche','pelle','relax']; var multiZona = sel.length>1 ? ordine.filter(has) : null; return { P:st.primary, main:main, mainNote:'', second:second, notes:[], multiZona:multiZona, extra:extra }; } /* ============================================================ 5. INTERFACCIA ============================================================ */ var state; function reset(){ state = { primary:null, primaryWord:null, primaryExit:null, others:[], q2b:null, needs2b:false }; } reset(); var $ = function(id){ return document.getElementById(id); }; var root = $('mysa-test'); var ICONS = { collo:'', schiena:'', luna:'', onde:'', lampo:'', coscia:'', relax:'', lente:'' }; function zona(id){ for(var i=0;i<ZONE.length;i++) if(ZONE[i].id===id) return ZONE[i]; } /* pallini: 1 = domanda 1, 2 = domanda 2, 3 = 2b (se prevista) */ function dots(n, tot){ var d = $('mtDots').children; for(var i=0;i=tot)?'none':''; d[i].className = (i<n)?'on':''; } } function go(id, dotN, dotTot){ var scr = root.querySelectorAll('.mt-screen'); for(var i=0;i60 ? root.offsetTop-20 : 0); } /* --- avatar di Annika: foto se c'è, altrimenti illustrazione lineare --- */ function avatarSVG(){ return '' + '' + '' + '' + '' + '' + '' + ''; } /* Espressioni per schermata: chiave = id sezione (s0, s1, s2, s2b, swait, sres). Se manca il file, si usa CONSULENTE.foto. */ var ESPRESSIONI = { s0: CONSULENTE.foto, // benvenuto — sorriso s1: CONSULENTE.foto, // domanda 1 — es. annika-curiosa.png s2: CONSULENTE.foto, // domanda 2 s2b: CONSULENTE.foto, // domanda extra swait:CONSULENTE.foto, // sta scrivendo — es. annika-scrive.png sres: CONSULENTE.foto }; function fotoPer(el){ var sec = el && el.closest ? el.closest('section.mt-screen') : null; return (sec && ESPRESSIONI[sec.id]) || CONSULENTE.foto; } function avatarInner(foto){ var f = foto || CONSULENTE.foto; return f ? '' : avatarSVG(); } function applyAvatars(){ var els = root.querySelectorAll('[data-avatar]'); for(var i=0;i<els.length;i++) els[i].innerHTML = avatarInner(fotoPer(els[i])); } /* "partiamo da" + articolo giusto: dal collo, dalla schiena, dalle notti… */ function conDa(s){ return s; } /* --- silhouette: una sola definizione, iniettata dove serve --- */ function figureSVG(){ return '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + ''; } function lightFig(wrap, parts){ if(!wrap) return; var els = wrap.querySelectorAll('[data-part]'); for(var i=0;i=0); } } /* */ function selectedParts(){ var s=[]; if(state.primary) s=s.concat(zona(state.primary).parte); state.others.forEach(function(o){ s=s.concat(zona(o).parte); }); return s; } /* --- schermata 1 --- */ function zoneBtn(z, screen){ var b = document.createElement('button'); b.type='button'; b.className='mt-btn mt-btn-zona'; b.setAttribute('data-zona', z.id); b.innerHTML = ICONS[z.icona] + ''+z.label+''; if(screen===1){ b.addEventListener('mouseenter', function(){ lightFig($('mtFig1'), z.parte); }); b.addEventListener('mouseleave', function(){ lightFig($('mtFig1'), []); }); b.addEventListener('focus', function(){ lightFig($('mtFig1'), z.parte); }); b.addEventListener('blur', function(){ lightFig($('mtFig1'), []); }); b.addEventListener('click', function(){ var sib = b.parentNode.querySelectorAll('[aria-pressed]'); for(var i=0;i=0) return false; return tutte.indexOf('collo')>=0 || tutte.indexOf('dormo')>=0; } function buildS2(){ var c = $('mtZone2'); c.innerHTML=''; ZONE.forEach(function(z){ if(z.id!==state.primary) c.appendChild(zoneBtn(z,2)); }); $('mtContinua').disabled = true; lightFig($('mtFig2'), selectedParts()); var base = state.primaryWord || zona(state.primary).breve; $('s2h').textContent = TESTI.d2.replace('{da}', conDa(base)); } /* --- schermata 2b --- */ var OPZ2B = [ { id:'pillow', label:"A pillow that supports your neck and spine all night" }, { id:'massage', label:"A pillow that gives you an acupressure massage at home, 20 minutes a day" } ]; function buildS2b(){ var c = $('mt2b'); c.innerHTML=''; OPZ2B.forEach(function(o){ var b=document.createElement('button'); b.type='button'; b.className='mt-btn mt-btn-zona'; b.innerHTML=''+o.label+''; b.setAttribute('aria-pressed','false'); b.addEventListener('click', function(){ b.setAttribute('aria-pressed','true'); state.q2b=o.id; track('risposta_2b',{scelta:o.id}); startWait(); }); c.appendChild(b); }); } function afterS2(){ track('altre_zone',{}); if(needs2bNow()){ buildS2b(); go('s2b', 3, 3); } else startWait(); } /* --- schermata di attesa: le righe costruite dalle risposte reali --- */ function waitLines(){ var z = zona(state.primary), l1; if(state.primaryWord) l1 = state.primaryWord.charAt(0).toUpperCase()+state.primaryWord.slice(1); else l1 = z.label; if((state.primary==='collo'||state.primary==='dormo') && state.q2b){ l1 += state.q2b==='pillow' ? ', especially at night' : state.q2b==='massage' ? ', especially during the day' : ', day and night'; } var lines=[l1]; if(state.others.length){ lines.push('And '+state.others.map(function(o){return zona(o).breve;}).join(', ')); } lines.push(TESTI.attesaRicerca); lines.push(TESTI.attesaTrovato); return lines; } function startWait(){ var lines = waitLines(); var c = $('mtWaitList'); c.innerHTML=''; lines.forEach(function(t){ var d=document.createElement('div'); d.className='mt-bolla mt-wline'; d.textContent=t; c.appendChild(d); }); $('mtTyping').style.display='inline-flex'; go('swait', 0, 0); var total = state.others.length ? 2800 : 2200; // regola var step = (total-700)/lines.length; for(var i=0;i1){ var aa = r.multiZona.map(Z); cosa = 'you want to tackle '+aa.slice(0,-1).join(', ')+' and '+aa[aa.length-1]+' together'; } else if(state.primary==='relax' && r.P && r.P!=='relax'){ cosa = 'you want to tackle '+Z(r.P)+' first of all, as well as stress and tension'; } else if(r.P && r.P!==state.primary && isLeg(r.P)){ cosa = 'you want to tackle '+Z(r.P)+' first of all, together with '+zona(state.primary).breve; } else if((state.primary==='collo'||state.primary==='dormo') && state.q2b){ cosa = state.q2b==='pillow' ? "you’re looking for a pillow that supports your neck and spine all night" : state.q2b==='massage' ? "you’re looking for a pillow that gives you an acupressure massage at home, 20 minutes a day" : "you’d like both: support at night and a massage during the day"; } else if(state.primaryWord){ cosa = 'you want to tackle '+state.primaryWord+' first of all'; } else { cosa = 'you want to tackle '+Z(state.primary)+' first of all'; } var p = baseProd(r.main); return esc(TESTI.consiglio).replace('{cosa}', esc(cosa)) .replace('{prodotto}', ''+esc(p.art)+'').replace('{spiega}', esc(maiusc(p.spiega))); } /* */ function rassicurazioneGambe(){ var pg = state.primary==='gambeLeggere' && state.others.indexOf('pelle')>=0; var pc = state.primary==='pelle' && state.others.indexOf('gambeLeggere')>=0; if(!pg && !pc) return ''; return ' '+esc(pg ? "And since you also mentioned cellulite: don’t worry, it’s great for that too." : "And since you also mentioned swollen legs: don’t worry, it’s great for those too."); } function maiusc(s){ return s.charAt(0)==='è' ? 'È'+s.slice(1) : s.charAt(0).toUpperCase()+s.slice(1); } /* Countdown "Offerta a tempo": parte da 00:59:59 quando compare il risultato (come sulle pagine prodotto) */ var ocdEnd = 0, ocdTimer = null; function ocdStart(){ ocdEnd = Date.now() + 59*60*1000 + 59*1000; clearInterval(ocdTimer); ocdTick(); ocdTimer = setInterval(ocdTick, 1000); } function ocdTick(){ var ms = Math.max(0, ocdEnd - Date.now()); var h = Math.floor(ms/3600000), m = Math.floor(ms%3600000/60000), sec = Math.floor(ms%60000/1000); var txt = (h<10?'0':'')+h+':'+(m<10?'0':'')+m+':'+(sec<10?'0':'')+sec; var els = root.querySelectorAll('[data-ocd]'); for(var i=0;i<els.length;i++) els[i].textContent = txt; if(ms<=0) clearInterval(ocdTimer); } function esc(s){ return s.replace(/&/g,'&').replace(/</g,'<'); } var MESI=['gennaio','febbraio','marzo','aprile','maggio','giugno','luglio','agosto','settembre','ottobre','novembre','dicembre']; function dataEstesa(d){ return d.getDate()+' '+MESI[d.getMonth()]+' '+d.getFullYear(); } function hrefFor(pid){ return PRODOTTI[pid].url; } /* Corpo variabile della card (foto, nome, perché, prezzo, bottone, recensione) */ function variantHTML(p, small, riga, href){ /* Foto: immagine di copertina del prodotto sul sito, mostrata intera in un riquadro quadrato */ var foto = p.img ? ''+esc(p.nome)+'' : 'Foto '+esc(p.nome); var btnCls = small ? 'mt-btn mt-btn-sec' : 'mt-btn'; return '
'+foto+'
' + '

'+esc(p.nome)+'

' + '

'+esc(riga||p.perche)+'

' + '

'+(p.prezzoListino?''+esc(p.prezzoListino)+'':'')+''+esc(p.prezzo)+'

' + '
Ends in00:59:59
' + 'Discover '+esc(p.nome)+'' + ((small||!p.rec)?'':'

'+p.rec+'
— '+esc(p.recAutore)+'

'); } /* Card prodotto: se l'uscita è una coppia, aggiunge il selettore Base/Pro (default Base) */ function cardHTML(exit, small, riga){ var c = COPPIE[exit]; if(!c){ return '
'+(small?'Also for you':'Recommended for you')+'
' + variantHTML(PRODOTTI[exit], small, riga, hrefFor(exit, small))+'
'; } return '
' + ''+(small?'Also for you':'Recommended for you')+'
' + '
' + '' + '' + '

'+esc(c.diff)+'

' + '
'+variantHTML(PRODOTTI[c.base], small, riga, hrefFor(c.base, small))+'
'; } /* Attiva i selettori Base/Pro dentro un contenitore */ function wireCoppie(scope){ var cards = scope.querySelectorAll('[data-coppia]'); for(var i=0;i<cards.length;i++)(function(card){ var cid = card.getAttribute('data-coppia'), small = card.getAttribute('data-small')==='1'; var btns = card.querySelectorAll('.mt-seg-b'); for(var j=0;j<btns.length;j++)(function(b){ b.addEventListener('click', function(){ for(var k=0;k<btns.length;k++) btns[k].setAttribute('aria-pressed','false'); b.setAttribute('aria-pressed','true'); var v = b.getAttribute('data-v'), pid = COPPIE[cid][v]; card.querySelector('.mt-vbody').innerHTML = variantHTML(PRODOTTI[pid], small, null, hrefFor(pid, small)); track('versione_card', {coppia:cid, versione:v}); }); })(btns[j]); })(cards[i]); } /* Messaggio WhatsApp costruito dalle risposte reali */ function waMessage(r){ var per; if(state.primaryWord) per = state.primaryWord; else if(state.primary==='dormo') per = 'sleeping better'; else per = zona(state.primary).breve; if(state.primary==='collo' && (state.q2b==='pillow'||state.q2b==='both')) per += ' at night'; var t = 'Hi '+CONSULENTE.nome+', I took the test and you recommended '+baseProd(r.main).nome+' for '+per; if(r.second) t += ' and '+baseProd(r.second.prod).nome+' for '+zona(r.second.zona).breve; return t+'. Can I ask you something?'; } function updSchedaTitle(){ $('mtSchedaTitle').textContent = TESTI.schedaTitolo; } function showResult(){ var r = computeResult(state); var main = baseProd(r.main); // testata scheda: titolo e silhouette piccola updSchedaTitle(); $('mtFig3').innerHTML = figureSVG(); lightFig($('mtFig3'), selectedParts()); $('mtApri').innerHTML = consiglioAnnika(r); var percheMain = COPPIE[r.main] ? null : main.perche + (r.mainNote?(' — '+r.mainNote.replace(/\.$/,'')).toLowerCase():''); var html = cardHTML(r.main, false, percheMain); r.notes.forEach(function(n){ html += '

'+n+'

'; }); $('mtMain').innerHTML = html;var _mg=document.querySelector('.mt-garanzie');if(_mg){_mg.style.display=(String(r.main).indexOf('relevia')>-1)?'none':'';} wireCoppie($('mtMain')); var sec=''; if(r.second){ var zb = zona(r.second.zona); var t2 = esc(TESTI.consiglioSecondo) .replace('{zona}', esc(r.second.label || zb.breve)) .replace('{prodotto}', ''+esc(baseProd(r.second.prod).art)+'') .replace('{spiega}', esc(maiusc(baseProd(r.second.prod).spiega))); sec = '
'+avatarInner(ESPRESSIONI.sres)+'
'+t2+'
' + cardHTML(r.second.prod, true, null); } if(r.extra){ var pe = baseProd(r.extra); sec += '
'+avatarInner(ESPRESSIONI.sres)+'
' + esc(TESTI.consiglioSchiena).replace('{prodotto}',''+esc(pe.art)+'').replace('{spiega}',esc(maiusc(pe.spiega)))+'
' + cardHTML(r.extra, true, null); } $('mtSecondo').innerHTML = sec; wireCoppie($('mtSecondo')); // consulente WhatsApp con messaggio precompilato dal risultato $('mtWa').href = 'https://wa.me/'+CONSULENTE.whatsapp+'?text='+encodeURIComponent(waMessage(r)); track('risultato', { principale:baseProd(r.main).nome, secondo:r.second?baseProd(r.second.prod).nome:null }); ocdStart(); go('s3', 0, 0); } /* --- pannello disturbi --- */ function buildSheet(){ var c = $('mtSheetList'); c.innerHTML=''; DISTURBI.forEach(function(g){ if(g.gruppo!==c.getAttribute('data-ultimo')){ var h=document.createElement('div'); h.className='mt-grp'; h.textContent=g.gruppo; c.appendChild(h); c.setAttribute('data-ultimo',g.gruppo); } g.voci.forEach(function(v){ var b=document.createElement('button'); b.type='button'; b.className='mt-d'; b.textContent=v[0]; b.addEventListener('click', function(){ var all = $('mtSheetList').querySelectorAll('.mt-d'); for(var i=0;i<all.length;i++) all[i].removeAttribute('aria-pressed'); b.setAttribute('aria-pressed','true'); closeSheet(); pickPrimary(g.zona, v[1], v[2]||null); }); c.appendChild(b); }); }); } function openSheet(){ $('mtSheet').classList.add('open'); $('mtScrim').classList.add('open'); $('mtCloseSheet').focus(); } function closeSheet(){ $('mtSheet').classList.remove('open'); $('mtScrim').classList.remove('open'); } /* --- wiring --- */ (function init(){ var c1 = $('mtZone1'); ZONE.forEach(function(z){ c1.appendChild(zoneBtn(z,1)); }); var cerca = document.createElement('button'); cerca.type='button'; cerca.id='mtOpenSheet'; cerca.className='mt-btn mt-btn-cerca'; cerca.innerHTML = ICONS.lente + ''+TESTI.linkElenco+''; c1.appendChild(cerca); buildSheet(); $('mtOpenSheet').addEventListener('click', openSheet); $('mtCloseSheet').addEventListener('click', closeSheet); $('mtScrim').addEventListener('click', closeSheet); document.addEventListener('keydown', function(e){ if(e.key==='Escape') closeSheet(); }); $('mtFig1').innerHTML = figureSVG(); $('mtFig2').innerHTML = figureSVG(); applyAvatars(); // testi di Annika (oggetto TESTI) $('mtT0Titolo').textContent = TESTI.introTitolo; $('mtT0').textContent = TESTI.intro; $('mtStart').textContent = TESTI.iniziamo; $('s1h').textContent = TESTI.d1; $('s2bh').textContent = TESTI.d2b; $('mtConsNome').textContent = CONSULENTE.consulente; $('mtConsTesto').textContent = TESTI.whatsapp; $('mtWa').innerHTML = ''+esc(TESTI.waBtn); $('mtSign').textContent = CONSULENTE.nome; root.querySelector('.mt-firma').firstChild.textContent = TESTI.firma; $('mtWa').addEventListener('click', function(){ track('whatsapp',{consulente:CONSULENTE.consulente}); }); $('mtKicker').textContent = TESTI.schedaKicker; $('mtSchedaSotto').textContent = TESTI.schedaSotto; updSchedaTitle(); dots(0, 0); // schermata 0: niente pallini $('mtStart').addEventListener('click', function(){ track('test_avviato'); go('s1', 1, 3); }); $('mtSoloQuello').addEventListener('click', function(){ state.others=[]; afterS2(); }); $('mtBack2').addEventListener('click', function(){ state.others=[]; track('indietro_s2'); go('s1', 1, 3); }); $('mtContinua').addEventListener('click', afterS2); $('mtRifai').addEventListener('click', function(){ track('rifai_test'); reset(); var pressed = root.querySelectorAll('[aria-pressed="true"]'); for(var i=0;i<pressed.length;i++) pressed[i].setAttribute('aria-pressed','false'); updSchedaTitle(); lightFig($('mtFig1'), []); go('s1', 1, 3); }); })(); })();
Mysa Mat
0
Recently Added Item(s)