Skip to content

Commit

Permalink
bug: conversion checkpoint is lost on selecting any of the facet value
Browse files Browse the repository at this point in the history
fixes issue 638
  • Loading branch information
vdua committed Sep 25, 2024
1 parent 544c5f1 commit 9452fe9
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tools/rum/slicer.js
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,16 @@ export function updateState() {
});
url.searchParams.set('domainkey', searchParams.get('domainkey') || 'incognito');

// with the conversion spec in form of dictionary
// need to put it back in the url by expanding the dictionary as follows
// the key is appended to conversion. and there can be multiple values for the same key
// conversion.key=value1&conversion.key=value2
Object.entries(conversionSpec).forEach(([key, values]) => {
values.forEach((value) => {
url.searchParams.append(`conversion.${key}`, value);
});
});

window.history.replaceState({}, '', url);
document.dispatchEvent(new CustomEvent('urlstatechange', { detail: url }));
}
Expand Down

0 comments on commit 9452fe9

Please sign in to comment.