Merged in fix/SW-2676-tracking-filters (pull request #2332)
fix(SW-2676): hotel filters tracking * fix(SW-2676): hotel filters tracking Approved-by: Linus Flood
This commit is contained in:
@@ -61,11 +61,13 @@ export default function HotelFilter({ className, filters }: HotelFiltersProps) {
|
||||
if (values === "") {
|
||||
newSearchParams.delete("filters")
|
||||
} else {
|
||||
trackFiltersEvent()
|
||||
newSearchParams.set("filters", values)
|
||||
}
|
||||
|
||||
if (values !== searchParams.values.toString()) {
|
||||
if (values !== searchParams.get("filters")) {
|
||||
if (values) {
|
||||
trackFiltersEvent()
|
||||
}
|
||||
window.history.replaceState(
|
||||
null,
|
||||
"",
|
||||
|
||||
Reference in New Issue
Block a user