Skip to content

Commit

Permalink
fix: add referer
Browse files Browse the repository at this point in the history
  • Loading branch information
kptdobe committed Jun 7, 2024
1 parent 016e6aa commit c4ff24d
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 @@ -109,7 +109,7 @@ function trackCheckpoint(checkpoint, data, t) {
if (optedIn(checkpoint, data) && isSelected) {
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 body = JSON.stringify({ weight, id, referer: urlSanitizers[window.hlx.RUM_MASK_URL || 'path'](), checkpoint, t, ...data }, KNOWN_PROPERTIES);
const { href: url, origin} = new URL(`.rum/${weight}`, sampleRUM.collectBaseURL || sampleRUM.baseURL);
if (window.location.origin === origin) {
const headers = { type: 'application/json' };
Expand Down

0 comments on commit c4ff24d

Please sign in to comment.