From d560ac0fcaf54224f06af4b5bc0a8e094792d6ea Mon Sep 17 00:00:00 2001 From: Bianca Widstam Date: Wed, 11 Jun 2025 09:02:05 +0000 Subject: [PATCH] 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 --- .../HotelReservation/SelectHotel/HotelFilter/index.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/scandic-web/components/HotelReservation/SelectHotel/HotelFilter/index.tsx b/apps/scandic-web/components/HotelReservation/SelectHotel/HotelFilter/index.tsx index 6c072035d..10420b0dd 100644 --- a/apps/scandic-web/components/HotelReservation/SelectHotel/HotelFilter/index.tsx +++ b/apps/scandic-web/components/HotelReservation/SelectHotel/HotelFilter/index.tsx @@ -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, "",