Sha256: 490d4ba4a091f616d4483c6ddcfb7387f8d886fb9fa521a740b0124b2b118ce3
Contents?: true
Size: 1.12 KB
Versions: 127
Compression:
Stored size: 1.12 KB
Contents
(function () { var parsedCookie = (function () { try { var cookies = document.cookie.split(';') for (var i = 0; i < cookies.length; i++) { var cookie = cookies[i].replace(/\s/g, '') // Remove all whitespace. var cookieName = 'cookies_policy=' if (cookie.indexOf(cookieName) === 0) { return JSON.parse(cookie.substring(cookieName.length)) } } } catch (error) { console.error(error) } return {} })() var insertScript = function () { var marker = document.querySelector('script[data-lux-reporter-script]') if (!marker) { console.error("Failed to configure real-user-monitoring because couldn't the lux-reporter script path wasn't available") return } var script = document.createElement('script') script.src = marker.getAttribute('data-lux-reporter-script') script.async = true script.defer = true marker.parentNode.insertBefore(script, marker) } if (parsedCookie.usage === true) { insertScript() } else { window.addEventListener('cookie-consent', function () { insertScript() }) } })()
Version data entries
127 entries across 127 versions & 1 rubygems