;(function () { function getCookie(name) { const value = '; ' + document.cookie const parts = value.split('; ' + name + '=') if (parts.length >= 2) return parts.pop().split(';').shift() return null } const clickId = new URLSearchParams(window.location.search).get('rtkupdclickid') if (!clickId) { return } let attempt = 0 const maxAttempts = 10 // = 10s (with 1s interval) const interval = setInterval(() => { attempt++ const fbp = getCookie('_fbp') const fbc = getCookie('_fbc') if (fbp || fbc) { clearInterval(interval) const url = new URL('https://tracking.skinnycoffeesuperboost.com/clickupd/' + clickId) if (fbc) url.searchParams.set('fbc', fbc) if (fbp) url.searchParams.set('fbp', fbp) const xhr = new XMLHttpRequest() xhr.open('GET', url.href) xhr.send() } else if (attempt >= maxAttempts) { clearInterval(interval) } }, 1000) })()