Skip to content

Commit

Permalink
feat(minirum): allow different base urls for collection and extra scr…
Browse files Browse the repository at this point in the history
…ipts
  • Loading branch information
chicharr committed Mar 6, 2024
1 parent 59c0a09 commit c1ea1f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ function trackCheckpoint(checkpoint, data, t) {
const sendPing = (pdata = data) => {
// eslint-disable-next-line object-curly-newline, max-len
const body = JSON.stringify({ weight, id, sanitizeURL: urlSanitizers[window.hlx.RUM_MASK_URL || 'path'], checkpoint, t, ...data }, KNOWN_PROPERTIES);
const url = new URL(`.rum/${weight}`, sampleRUM.baseURL).href;
const url = new URL(`.rum/${weight}`, sampleRUM.collectorBaseURL || sampleRUM.baseURL).href;
navigator.sendBeacon(url, body);
// eslint-disable-next-line no-console
console.debug(`ping:${checkpoint}`, pdata);
Expand Down

0 comments on commit c1ea1f1

Please sign in to comment.