Skip to content

Commit

Permalink
fix(lib): update scripts/aem.js to aem.js@2.5.7
Browse files Browse the repository at this point in the history
  • Loading branch information
semantic-release-bot committed Sep 19, 2024
1 parent 220bc9b commit b34cbb0
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions scripts/aem.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,13 @@ function sampleRUM(checkpoint, data) {
t: time,
...pingData,
});
const { href: url, origin } = new URL(`.rum/${weight}`, sampleRUM.collectBaseURL);
const urlParams = window.RUM_PARAMS
? `?${new URLSearchParams(window.RUM_PARAMS).toString()}`
: '';
const { href: url, origin } = new URL(
`.rum/${weight}${urlParams}`,
sampleRUM.collectBaseURL,
);
const body = origin === window.location.origin
? new Blob([rumData], { type: 'application/json' })
: rumData;
Expand Down Expand Up @@ -108,7 +114,7 @@ function sampleRUM(checkpoint, data) {
}
document.dispatchEvent(new CustomEvent('rum', { detail: { checkpoint, data } }));
} catch (error) {
// something went wrong
// something went awry
}
}

Expand Down

0 comments on commit b34cbb0

Please sign in to comment.