Sha256: 0932544c63dbef9a9e9d2ec38aa8aab035f20fce35d7c73ceafdb4dda2e063c4
Contents?: true
Size: 1.16 KB
Versions: 88
Compression:
Stored size: 1.16 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 () { window.removeEventListener('cookie-consent', insertScript) 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', insertScript) } })()
Version data entries
88 entries across 88 versions & 1 rubygems