1<!DOCTYPE HTML> 2<html lang="en"> 3 4<head> 5 <!-- Required meta tags --> 6 <meta charset="utf-8"> 7 <meta http-equiv="cache-control" content="Cache-Control: max-age=31536000"/> 8 <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> 9 10 11 12 <link rel="preload" href="https://fonts.googleapis.com/css2?family=Inter:[email protected]&display=swap" as="style" 13 onload="this.onload=null;this.rel='stylesheet'"/> 14 <noscript> 15 <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inter:[email protected]&display=swap"/> 16 </noscript> 17 18 19 <!-- Mida A/B Testing Script --> 20
20<script> 21 var timeout = 3000; // Timeout value to remove the flicker (in milliseconds) 22 !function (h, i, d, e) { 23 var t, n = h.createElement("style"); 24 n.id = e, n.innerHTML = "body{opacity:0}", h.head.appendChild(n), t = d, i.rmfk = function () { 25 var t = h.getElementById(e); 26 t && t.parentNode.removeChild(t) 27 }, setTimeout(i.rmfk, t) 28 }(document, window, timeout, "abhide"); 29 </script>
29 30
30<script type="text/javascript" async src="https://cdn.mida.so/js/optimize.js?key=7ZnlPekbRGPwmBXVD180j3"></script>
30 31 32
32<script>!function (w, d, s, u) { 33 if (w.oaiq) return; 34 var q = function () { 35 q.q.push(arguments) 36 }; 37 q.q = []; 38 w.oaiq = q; 39 var j = d.createElement(s); 40 j.async = 1; 41 j.src = u; 42 var f = d.getElementsByTagName(s)[0]; 43 f.parentNode.insertBefore(j, f) 44 }(window, document, "script", "https://bzrcdn.openai.com/sdk/oaiq.min.js"); 45 46 oaiq("init", { 47 pixelId: "CWbWWC7AwRVBGH37ypSYPP", 48 debug: true, 49 }); 50 </script>
50 51 52
52<script> 53 // Shared client-side payment telemetry. The Apple Pay / Braintree flows 54 // in the checkout/fee pages swallow most errors (callbacks just 55 // `return`), so Sentry's automatic capture never sees them â a failed 56 // merchant validation or tokenize just leaves the user on a dead/hung 57 // sheet with no signal. These helpers let those paths report explicitly. 58 // Everything is guarded so telemetry can never itself break checkout. 59 window.reportPaymentIssue = function (step, err, extra) { 60 try { 61 var detail = err && err.message ? err.message : String(err); 62 console.error('[payment] ' + step + ':', err); 63 if (window.Sentry && typeof window.Sentry.captureException === 'function') { 64 var ex = (err instanceof Error) ? err : new Error(step + ': ' + detail); 65 window.Sentry.captureException(ex, { 66 tags: {flow: 'checkout', payment_step: step}, 67 extra: Object.assign({step: step, detail: detail}, extra || {}) 68 }); 69 } 70 } catch (e) { /* never let telemetry break checkout */ 71 } 72 }; 73 window.paymentBreadcrumb = function (step, data) { 74 try { 75 if (window.Sentry && typeof window.Sentry.addBreadcrumb === 'function') { 76 window.Sentry.addBreadcrumb({category: 'checkout', level: 'info', message: step, data: data || {}}); 77 } 78 } catch (e) { /* noop */ 79 } 80 }; 81 </script>
81 82 83 <meta name='impact-site-verification' value='4ea448c7-420d-4bdb-a382-91ea945f17ea'> 84 <link rel="apple-touch-icon" sizes="180x180" href="/assets/vin_seeker/favicons/apple-touch-icon.png"> 85 <link rel="icon" type="image/png" sizes="32x32" href="/assets/vin_seeker/favicons/favicon-32x32.png"> 86 <link rel="icon" type="image/png" sizes="16x16" href="/assets/vin_seeker/favicons/favicon-16x16.png"> 87 <link rel="manifest" href="/assets/vin_seeker/favicons/site.webmanifest"> 88 <link rel="mask-icon" href="/assets/vin_seeker/favicons/safari-pinned-tab.svg" color="#5bbad5"> 89 <link rel="shortcut icon" href="/assets/vin_seeker/favicons/favicon.ico"> 90 <meta name="msapplication-TileColor" content="#da532c"> 91 <meta name="msapplication-config" content="/assets/vin_seeker/favicons/browserconfig.xml"> 92 <meta name="theme-color" content="#4097FF"> 93 94
94<script async src="https://funnelop.on-forge.com/snippet/loader.js" data-site="4f79GuPp8BgQlX9tOCw3TxUq"></script>
94 95 96 <!-- HTML Meta Tags --> 97 98 <title>Login - Get an instant VIN report now</title> 99 <meta name="title" content="Login - Get an instant VIN report now"> 100 <meta name="description" 101 content="Login to your account to generate more reports or manage your subscription. You'll be able to see all your past reports and create new ones."> 102 103 <!-- Facebook Meta Tags --> 104 <meta property="og:url" content="https://vinseeker.com/login"> 105 <meta property="og:type" content="website"> 106 <meta property="og:title" content="Login - Get an instant VIN report now"> 107 <meta property="og:description" 108 content="Login to your account to generate more reports or manage your subscription. You'll be able to see all your past reports and create new ones."> 109 <meta property="og:image" content="https://vinseeker.com/assets/vin_seeker/favicons/seobanner.png"> 110 111 <!-- Twitter Meta Tags --> 112 <meta name="twitter:card" content="summary_large_image"> 113 <meta property="twitter:domain" content="vinseeker.com"> 114 <meta property="twitter:url" content="https://vinseeker.com/login"> 115 <meta name="twitter:title" content="Login - Get an instant VIN report now"> 116 <meta name="twitter:description" 117 content="Login to your account to generate more reports or manage your subscription. You'll be able to see all your past reports and create new ones."> 118 <meta name="twitter:image" content="https://vinseeker.com/assets/vin_seeker/favicons/seobanner.png"> 119 120 121 <!-- Google tag (gtag.js) -->
vendor: 62 bytes, lines 121-122
121 122 <script src="https://www.googletagmanager.com/gtag/js?id=
122AW-16473692534
vendor: 22 bytes, lines 122-123
122" defer></script> 123
123<script> 124
vendor: 177 bytes, lines 124-132
124window.dataLayer = window.dataLayer || []; 125 126 function gtag() { 127 dataLayer.push(arguments); 128 } 129 130 gtag('js', new Date()); 131 132 gtag('config', '
132AW-16473692534
vendor: 8 bytes, lines 132-133
132'); 133
133</script>
133 134 135 <!-- Bing Ads Tag --> 136
136<script> 137 (function (w, d, t, u, o) { 138 w[u] = w[u] || [], o.ts = (new Date).getTime(); 139 var n = d.createElement(t); 140 n.src = "https://bat.bing.net/bat.js?ti=" + o.ti + ("uetq" != u ? "&q=" + u : ""), n.async = 1, n.onload = n.onreadystatechange = function () { 141 var s = this.readyState; 142 s && "loaded" !== s && "complete" !== s || (o.q = w[u], w[u] = new UET(o), w[u].push("pageLoad"), n.onload = n.onreadystatechange = null) 143 }; 144 var i = d.getElementsByTagName(t)[0]; 145 i.parentNode.insertBefore(n, i); 146 })(window, document, "script", "uetq", {ti: "343126383", enableAutoSpaTracking: true}); 147 </script>
147 148 149 <link rel="preload" as="style" href="https://vinseeker.com/build/assets/vinseeker-Keustdgu.css" /><link rel="modulepreload" as="script" href="https://vinseeker.com/build/assets/bootstrap-compat-DN4QW3fg.js" /><link rel="stylesheet" href="https://vinseeker.com/build/assets/vinseeker-Keustdgu.css" data-navigate-track="reload" />
149<script type="module" src="https://vinseeker.com/build/assets/bootstrap-compat-DN4QW3fg.js" data-navigate-track="reload"></script>
149 150
150<script data-cfasync="false" nonce="0ff9d6aa-33fe-4081-ae0a-675bc4a36a26">try{(function(w,d){!function(kP,kQ,kR,kS){if(kP.zaraz)console.error("zaraz is loaded twice");else{kP[kR]=kP[kR]||{};kP[kR].executed=[];kP.zaraz={deferred:[],listeners:[]};kP.zaraz._v="20";kP.zaraz._n="0ff9d6aa-33fe-4081-ae0a-675bc4a36a26";kP.zaraz.q=[];kP.zaraz._f=function(kT){return async function(){var kU=Array.prototype.slice.call(arguments);kP.zaraz.q.push({m:kT,a:kU})}};for(const kV of["track","set","debug"])kP.zaraz[kV]=kP.zaraz._f(kV);kP.zaraz.init=()=>{var kW=kQ.getElementsByTagName(kS)[0],kX=kQ.createElement(kS),kY=kQ.getElementsByTagName("title")[0];kY&&(kP[kR].t=kQ.getElementsByTagName("title")[0].text);kP[kR].x=Math.random();kP[kR].w=kP.screen.width;kP[kR].h=kP.screen.height;kP[kR].j=kP.innerHeight;kP[kR].e=kP.innerWidth;kP[kR].l=kP.location.href;kP[kR].r=kQ.referrer;kP[kR].k=kP.screen.colorDepth;kP[kR].n=kQ.characterSet;kP[kR].o=(new Date).getTimezoneOffset();if(kP.dataLayer)for(const kZ of Object.entries(Object.entries(dataLayer).reduce((k$,la)=>({...k$[1],...la[1]}),{})))zaraz.set(kZ[0],kZ[1],{scope:"page"});kP[kR].q=[];for(;kP.zaraz.q.length;){const lb=kP.zaraz.q.shift();kP[kR].q.push(lb)}kX.defer=!0;for(const lc of[localStorage,sessionStorage])Object.keys(lc||{}).filter(le=>le.startsWith("_zaraz_")).forEach(ld=>{try{kP[kR]["z_"+ld.slice(7)]=JSON.parse(lc.getItem(ld))}catch{kP[kR]["z_"+ld.slice(7)]=lc.getItem(ld)}});kX.referrerPolicy="origin";kX.src="/cdn-cgi/zaraz/s.js?z="+btoa(encodeURIComponent(JSON.stringify(kP[kR])));kW.parentNode.insertBefore(kX,kW)};["complete","interactive"].includes(kQ.readyState)?zaraz.init():kP.addEventListener("DOMContentLoaded",zaraz.init)}}(w,d,"zarazData","script");window.zaraz._p=async kH=>new Promise(kI=>{if(kH){kH.e&&kH.e.forEach(kJ=>{try{const kK=d.querySelector("script[nonce]"),kL=kK?.nonce||kK?.getAttribute("nonce"),kM=d.createElement("script");kL&&(kM.nonce=kL);kM.innerHTML=kJ;kM.onload=()=>{d.head.removeChild(kM)};d.head.appendChild(kM)}catch(kN){console.error(`Error executing script: ${kJ}\n`,kN)}});Promise.allSettled((kH.f||[]).map(kO=>fetch(kO[0],kO[1])))}kI()});zaraz._p({"e":["(function(w,d){})(window,document)"]});})(window,document)}catch(e){throw fetch("/cdn-cgi/zaraz/t"),e;};</script>
150</head> 151 152<body class="bg-primary site-vehicle_vin_seeker"> 153 154<div class=""> 155 156 <nav 157 class="navbar navbar-expand-lg hidden lg:block md:py-6 absolute top-0 left-0 right-0 bg-transparent "> 158 <div class="w-full md:w-5/6 mx-auto container-fluid"> 159 <a class="navbar-brand py-0 flex flex-col justify-center" href="/"> 160 <img src="https://vinseeker.com/assets/vin_seeker/vinseeker_branding/logo_styled_text_white.png" alt="" 161 style="height: 23px;"> 162 </a> 163 <button class="navbar-toggler ms-auto" type="button" data-bs-toggle="collapse" 164 data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" 165 aria-expanded="false" 166 aria-label="Toggle navigation"> 167 <span class="navbar-toggler-icon"></span> 168 </button> 169 <div class="collapse navbar-collapse" id="navbarSupportedContent"> 170 <ul class="navbar-nav ms-auto"> 171 <li class="nav-item"> 172 <a class="nav-link" href="/blog">Blog</a> 173 </li> 174 <li class="nav-item"> 175 <a class="nav-link" href="/value-my-car">Value My Car</a> 176 </li> 177 <li class="nav-item"> 178 <a class="nav-link" href="/contact-us">Contact Us</a> 179 </li> 180 <li class="nav-item"> 181 <a class="nav-link" href="mailto:[email protected]">[email protected]</a> 182 </li> 183 <li class="nav-item"> 184 <a class="nav-link" 185 href="tel:888-564-8057">888-564-8057</a> 186 </li> 187 </ul> 188 </div> 189 </div> 190 </nav> 191 <nav 192 class="navbar lg:hidden navbar-expand md:py-6 absolute top-0 left-0 right-0 bg-transparent "> 193 <div class="w-full md:w-5/6 mx-auto container-fluid"> 194 <a class="navbar-brand m-0 ps-2 py-0 flex flex-col justify-center" href="/"> 195 <img src="https://vinseeker.com/assets/vin_seeker/vinseeker_branding/logo_icon_white.png" alt="" 196 style="height: 20px;"> 197 </a> 198 <button class="navbar-toggler ms-auto" type="button" data-bs-toggle="collapse" 199 data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" 200 aria-expanded="false" 201 aria-label="Toggle navigation"> 202 <span class="navbar-toggler-icon"></span> 203 </button> 204 <div class="collapse navbar-collapse" id="navbarSupportedContent"> 205 <ul class="navbar-nav ms-auto"> 206 <li class="nav-item"> 207 <a class="nav-link" href="/value-my-car">Value My Car</a> 208 </li> 209 <li class="nav-item"> 210 <a class="nav-link" href="/contact-us">Contact</a> 211 </li> 212 <li class="nav-item"> 213 <a class="nav-link" href="/login"> 214 <svg class="lucide" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> 215 <path d="m10 17 5-5-5-5"/> 216 <path d="M15 12H3"/> 217 <path d="M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4"/> 218</svg> </a> 219 </li> 220 </ul> 221 </div> 222 </div> 223 </nav> 224</div> 225 226 <div class="flex flex-wrap"> 227 <div class="w-11/12 mx-auto md:pt-12 md:w-1/2 bg-primary text-white mt-12"> 228 <div class="container mt-12 py-12"> 229 <div class="flex flex-wrap -mx-3 justify-center xl:py-12"> 230 <div class="w-full md:w-5/6 lg:w-1/2 px-3 md:pb-12 lg:mb-12"> 231 <form method="POST" action="/login" class="2xl:py-12"> 232 <input type="hidden" name="_token" value="BALODdmAE6u3zAI2qTTIdmfKQv3Si0RbriKuEb1T" autocomplete="off"> 233 <h1 class="font-semibold text-center display-5 2xl:mt-12"> 234 Login 235 </h1> 236 <p class="text-center text-white/50 mb-12"> 237 Login to your VINSeeker account 238 </p> 239 240 <div class="form-floating floating-transparent mb-4"> 241 <input id="email" type="email" class="form-control bg-transparent border border-white/25 text-white placeholder-white " name="email" value="" required autocomplete="email" autofocus placeholder="Enter Your Email Address"> 242 <label for="email" class="text-white">Email Address</label> 243 </div> 244 245 <button type="submit" class="btn block w-full btn-light py-4"> 246 Continue 247 <i class="far fa-sign-in"></i> 248 </button> 249 </form> 250 </div> 251 </div> 252 </div> 253 </div> 254 <div class="w-full md:pt-12 bg-white md:w-1/2 hidden md:flex items-center justify-center"> 255 <img src="https://vinseeker.com/assets/vin_seeker/phone_car.webp" class="max-w-full h-auto" alt="Login" style="width: 400px;max-width: 80%;"> 256 </div> 257 </div> 258 259<footer class="text-center lg:text-left text-white bg-primary-darker"> 260 <section class=""> 261 <div class="w-11/12 md:w-5/6 mx-auto text-center md:text-left py-12 items-center"> 262 <div class="flex flex-wrap justify-center gap-y-12 md:gap-12"> 263 <div class="w-full md:w-1/4 text-center flex justify-center items-center"> 264 <div> 265 <h6 class="uppercase font-semibold">Useful links</h6> 266 <hr class="mb-6 mt-0 inline-block mx-auto" 267 style="width: 60px; background-color: #7c4dff; height: 2px"/> 268 <p> 269 <a href="/blog" class="text-white">Blog</a> 270 </p> 271 <p> 272 <a href="/affiliate-program" class="text-white">Affiliate Program</a> 273 </p> 274 <p> 275 <a href="/terms" class="text-white">Terms & Conditions</a> 276 </p> 277 <p> 278 <a href="/privacy-policy" class="text-white">Privacy Policy</a> 279 </p> 280 </div> 281 </div> 282 <div class="w-full md:w-1/4 text-center flex justify-center items-center"> 283 <div> 284 <h6 class="uppercase font-semibold">Contact</h6> 285 <hr class="mb-6 mt-0 inline-block mx-auto" 286 style="width: 60px; background-color: #7c4dff; height: 2px"/> 287 <p> 288 <svg class="lucide me-4" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> 289 <path d="M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8"/> 290 <path d="M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/> 291</svg> 382 NE 191st St, Miami, Fl 33179-3899 292 </p> 293 <p> 294 <svg class="lucide me-4" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> 295 <path d="m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7"/> 296 <rect x="2" y="4" width="20" height="16" rx="2"/> 297</svg> [email protected]</p> 298 <p> 299 <svg class="lucide me-4" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
300 <path d="M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384"/> 301</svg> 888-564-8057</p> 302 </div> 303 </div> 304 </div> 305 </div> 306 </section> 307 <div class="text-center p-4" style="background-color: rgba(0, 0, 0, 0.2)"> 308 ©2026 Copyright: 309 <a class="text-white" href="https://vinseeker.com/">VINSeeker.com</a> 310 </div> 311</footer> 312 313 314
314<script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
314 315 316 317
317<script src="https://kit.fontawesome.com/f408540ea0.js" defer crossorigin="anonymous"></script>
317 318 319
320<script> 321 (function () { 322 var VIN_RE = /^[A-HJ-NPR-Z0-9]{11,17}$/; 323 324 function cleanVin(input) { 325 return String((input && input.vin) || '').toUpperCase().replace(/\s+/g, ''); 326 } 327 328 function text(message) { 329 return { content: [{ type: 'text', text: message }] }; 330 } 331 332 var tools = [ 333 { 334 name: 'decode_vin', 335 title: 'Decode VIN', 336 description: 'Decode a US vehicle VIN into specifications: year, make, model, ' + 337 'trim, engine, drivetrain, fuel economy and dimensions. Free â does NOT ' + 338 'include title, accident, odometer or ownership history.', 339 inputSchema: { 340 type: 'object', 341 properties: { 342 vin: { type: 'string', description: '11â17 character US VIN, e.g. 1HGCM82633A004352.' } 343 }, 344 required: ['vin'] 345 }, 346 annotations: { readOnlyHint: true, untrustedContentHint: false }, 347 execute: async function (input) { 348 var vin = cleanVin(input); 349 if (!VIN_RE.test(vin)) { 350 return text('Please provide a valid 11â17 character VIN.'); 351 } 352 try { 353 var res = await fetch('/api/vin-decode/' + encodeURIComponent(vin), { 354 headers: { 'Accept': 'application/json' } 355 }); 356 var data = await res.json(); 357 if (!res.ok || !data || data.ok === false) { 358 return text('Could not decode VIN ' + vin + '.'); 359 } 360 return text(JSON.stringify(data)); 361 } catch (e) { 362 return text('The VIN decoder is temporarily unavailable.'); 363 } 364 } 365 }, 366 { 367 name: 'lookup_vehicle', 368 title: 'Get a vehicle history report', 369 description: 'Start a VINSeeker vehicle history report for a VIN â accidents, ' + 370 'title checks, mileage and ownership. Opens the report flow on vinseeker.com ' + 371 'so the user can complete their purchase.', 372 inputSchema: { 373 type: 'object', 374 properties: { 375 vin: { type: 'string', description: '11â17 character US VIN.' } 376 }, 377 required: ['vin'] 378 }, 379 annotations: { readOnlyHint: false }, 380 execute: async function (input) { 381 var vin = cleanVin(input); 382 if (!VIN_RE.test(vin)) { 383 return text('Please provide a valid 11â17 character VIN.'); 384 } 385 window.location.assign('/process/' + encodeURIComponent(vin)); 386 return text('Opening the VINSeeker vehicle history report for VIN ' + vin + '.'); 387 } 388 } 389 ]; 390 391 function register(ctx) { 392 if (!ctx) return; 393 // Declarative API sets the whole tool list at once â prefer it. 394 if (typeof ctx.provideContext === 'function') { 395 try { ctx.provideContext({ tools: tools }); return; } catch (e) { /* fall through */ } 396 } 397 // Imperative API registers one tool at a time. 398 if (typeof ctx.registerTool === 'function') { 399 tools.forEach(function (tool) { 400 try { ctx.registerTool(tool); } catch (e) { /* ignore */ } 401 }); 402 } 403 } 404 405 function init() { 406 register(navigator.modelContext); 407 register(document.modelContext); 408 } 409 410 if (document.readyState === 'loading') { 411 document.addEventListener('DOMContentLoaded', init); 412 } else { 413 init(); 414 } 415 })(); 416</script>
416 417 418 419
419<script> 420 (function () { 421 var ENDPOINT = "https:\/\/vinseeker.com\/mida-assignment"; 422 var TOKEN = "BALODdmAE6u3zAI2qTTIdmfKQv3Si0RbriKuEb1T"; 423 var POLL_MS = 150; 424 var TIMEOUT_MS = 8000; 425 // How long to keep watching for a late (re)assignment after the initial 426 // poll settles. Long enough to cover a visitor who leaves checkout 427 // open, bounded so the timer doesn't outlive any plausible session. 428 var WATCH_MS = 600000; 429 var WATCH_INTERVAL_MS = 5000; 430 // Survives page-to-page within the visit, so the beacon fires once per 431 // change rather than once per page view. 432 var SENT_KEY = '_vs_mida_sent'; 433 434 function readJson(raw, fallback) { 435 try { 436 var parsed = JSON.parse(raw); 437 return parsed === null ? fallback : parsed; 438 } catch (e) { 439 return fallback; 440 } 441 } 442 443 /** Test definitions, keyed by test id as a string. Best-effort. */ 444 function testDefinitions() { 445 var defs = []; 446 447 try { 448 if (typeof window.getMidaAbcacheState === 'function') { 449 defs = window.getMidaAbcacheState() || []; 450 } 451 } catch (e) { 452 } 453 454 if (!defs.length) { 455 defs = readJson(localStorage.getItem('_abcache'), []) || []; 456 } 457 458 var byId = {}; 459 if (Object.prototype.toString.call(defs) === '[object Array]') { 460 defs.forEach(function (d) { 461 if (d && d.test_id) byId[String(d.test_id)] = d; 462 }); 463 } 464 465 return byId; 466 } 467 468 /** 469 * The friendly name the Mida UI shows for a variant ("Wheel + APM 470 * Blur"). `data` is a JSON *string* mapping target URL -> variant 471 * list, so it needs parsing before the variant names can be matched. 472 */ 473 function variantLabel(def, variantName) { 474 var data = readJson((def && def.data) || '{}', {}); 475 var label = null; 476 477 Object.keys(data).forEach(function (url) { 478 var variants = data[url] || [];
479 variants.forEach(function (v) { 480 if (v && v.name === variantName && v.nickname) label = v.nickname; 481 }); 482 }); 483 484 return label; 485 } 486 487 function testType(def) { 488 if (!def) return null; 489 if (def.is_split_test) return 'split_url'; 490 if (def.is_mvt) return 'mvt'; 491 if (def.is_aa) return 'aa'; 492 return 'ab'; 493 } 494 495 /** 496 * The visitor identity the NEWEST assignment was made under. 497 * 498 * Mida never prunes `_variant_result`, so a browser accumulates every 499 * test it has ever been bucketed into â including ones that finished 500 * months ago. Assignments made under an EARLIER visitor uuid are 501 * leftovers from a previous identity and are dropped below. Ids are 502 * Mida's auto-increment, so the highest id is the most recent 503 * assignment and therefore the live identity. 504 * 505 * This can't catch a stale test assigned under the CURRENT uuid â those 506 * still come through, and show up as tests with a trickle of traffic on 507 * the AB Tests page, which is what its low-traffic filter is for. 508 */ 509 function currentIdentity(results) { 510 var newest = null; 511 512 Object.keys(results).forEach(function (testId) { 513 if (newest === null || Number(testId) > newest) newest = Number(testId); 514 }); 515 516 return newest === null ? null : ((results[String(newest)] || {}).uuid || null); 517 } 518 519 /** 520 * Current memberships in the shape MidaAssignments::normalize() 521 * expects. Returns [] when Mida hasn't assigned anything (yet). 522 */ 523 function readAssignments() { 524 var results = readJson(localStorage.getItem('_variant_result'), {}) || {}; 525 var defs = testDefinitions(); 526 var identity = currentIdentity(results); 527 var out = []; 528 529 Object.keys(results).forEach(function (testId) { 530 var result = results[testId] || {}; 531 var def = defs[testId] || {}; 532 var variant = result.vaId; 533 534 // PRESENT-BUT-FALSY IS A REAL ARM. Mida writes the arm's name 535 // for a treatment ("Variant 1") but a bare 0 for control, so a 536 // truthiness check here silently throws away every control 537 // visitor â half the test. Only absent or empty means "not 538 // bucketed". The server canonicalises 0 to "Control" and 539 // derives the control flag from the name, so this passes the 540 // raw value straight through. 541 if (variant === undefined || variant === null || variant === '') return; 542 543 // Leftover from a previous visitor identity â see above. 544 if (identity && result.uuid && result.uuid !== identity) return; 545 546 out.push({ 547 test_id: Number(testId), 548 test_key: def.test_key || null, 549 test_name: def.test_name || null, 550 variant: variant, 551 variant_label: variantLabel(def, variant), 552 uuid: result.uuid || null, 553 type: testType(defs[testId]) 554 }); 555 }); 556 557 return out; 558 } 559 560 /** Put the capture on every form that has a slot for it. */ 561 function fillFields(payload) { 562 var fields = document.querySelectorAll('input[name="mida_tests"]'); 563 for (var i = 0; i < fields.length; i++) { 564 fields[i].value = payload; 565 } 566 } 567 568 function beacon(payload) { 569 try { 570 if (sessionStorage.getItem(SENT_KEY) === payload) return; 571 sessionStorage.setItem(SENT_KEY, payload); 572 } catch (e) { 573 // Private mode / storage disabled â send anyway, the server 574 // skips the write when nothing has changed. 575 } 576 577 try { 578 fetch(ENDPOINT, { 579 method: 'POST', 580 headers: {'Content-Type': 'application/json', 'X-CSRF-TOKEN': TOKEN}, 581 body: JSON.stringify({mida_tests: JSON.parse(payload)}), 582 credentials: 'same-origin', 583 // Survives the navigation out of checkout. 584 keepalive: true 585 }).catch(function () { 586 }); 587 } catch (e) { 588 } 589 } 590 591 function publish(tests) { 592 var payload = JSON.stringify(tests); 593 fillFields(payload);
594 beacon(payload); 595 } 596 597 // Poll until Mida has assigned, then publish. Re-checks periodically 598 // afterwards as well: a CSS/redirect test can assign late, and on a 599 // long-lived checkout page the visitor may be bucketed after first 600 // paint. Each publish is deduplicated by payload, so a stable 601 // assignment costs one field write and one request for the whole visit. 602 var deadline = Date.now() + TIMEOUT_MS; 603 var watchUntil = Date.now() + WATCH_MS; 604 var last = null; 605 606 (function poll() { 607 var tests = readAssignments(); 608 609 if (tests.length) { 610 var payload = JSON.stringify(tests); 611 if (payload !== last) { 612 last = payload; 613 publish(tests); 614 } 615 } 616 617 // Tight loop until Mida assigns or the deadline passes, then a 618 // slow watch for late assignment, then stop. 619 if (!tests.length && Date.now() < deadline) { 620 setTimeout(poll, POLL_MS); 621 } else if (Date.now() < watchUntil) { 622 setTimeout(poll, WATCH_INTERVAL_MS); 623 } 624 })(); 625 })(); 626</script>
626 627
628<script type="module" src="https://static.cloudflareinsights.com/beacon.min.js/v4bc70e2c01a94c73b74392e4234840661791215815920" integrity="sha512-L0ha0OXavK/8okipN9F8BtP84dg9DUhPERbBXzwI6dgTA55d2+yweo3pn5CSFYs45/r8md2+xvUPtTdvTNRfjA==" data-cf-beacon='{"version":"2024.11.0","token":"3ccf09b3e9fd447197bce26b7e1dfd9c","spa":2}' crossorigin="anonymous"></script>
628 629</body> 630 631 632</html>
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.