diff --git a/scripts/aem.js b/scripts/aem.js index 73d35eb..260ea22 100644 --- a/scripts/aem.js +++ b/scripts/aem.js @@ -93,14 +93,18 @@ function sampleRUM(checkpoint, data) { sampleRUM.baseURL = sampleRUM.baseURL || new URL(window.RUM_BASE || '/', new URL('https://ot.aem.live')); sampleRUM.collectBaseURL = sampleRUM.collectBaseURL || sampleRUM.baseURL; sampleRUM.sendPing = (ck, time, pingData = {}) => { + const uaExtra = navigator.webdriver && !navigator.userAgent.includes('+http') + ? { ua: `${navigator.userAgent} +http://navigator.webdriver` } + : {}; // eslint-disable-next-line max-len, object-curly-newline const rumData = JSON.stringify({ weight, id, - referer: window.location.href, + referer: window.location.origin + window.location.pathname, checkpoint: ck, t: time, ...pingData, + ...uaExtra, }); const urlParams = window.RUM_PARAMS ? new URLSearchParams(window.RUM_PARAMS).toString() || '' @@ -471,24 +475,6 @@ function decorateSections(main) { section.classList.add('section'); section.dataset.sectionStatus = 'initialized'; section.style.display = 'none'; - - // Process section metadata - const sectionMeta = section.querySelector('div.section-metadata'); - if (sectionMeta) { - const meta = readBlockConfig(sectionMeta); - Object.keys(meta).forEach((key) => { - if (key === 'style') { - const styles = meta.style - .split(',') - .filter((style) => style) - .map((style) => toClassName(style.trim())); - styles.forEach((style) => section.classList.add(style)); - } else { - section.dataset[toCamelCase(key)] = meta[key]; - } - }); - sectionMeta.parentNode.remove(); - } }); }