Merged in fix/SW-2676-tracking-select-hotel (pull request #2165)
Fix/SW-2676 tracking select hotel * fix(SW-2676): add tracking select hotel * fix(SW-2676): fix tracking text * fix(SW-2676): create tracking function Approved-by: Tobias Johansson
This commit is contained in:
@@ -5,6 +5,7 @@ import { useCallback } from "react"
|
||||
import { useIntl } from "react-intl"
|
||||
|
||||
import Select from "@/components/TempDesignSystem/Select"
|
||||
import { trackEvent } from "@/utils/tracking/base"
|
||||
|
||||
import {
|
||||
type HotelSorterProps,
|
||||
@@ -28,7 +29,12 @@ export default function HotelSorter({ discreet }: HotelSorterProps) {
|
||||
|
||||
const newSearchParams = new URLSearchParams(searchParams)
|
||||
newSearchParams.set("sort", newSort)
|
||||
|
||||
trackEvent({
|
||||
event: "sortOptionClick",
|
||||
filter: {
|
||||
sortOptions: newSort,
|
||||
},
|
||||
})
|
||||
window.history.replaceState(
|
||||
null,
|
||||
"",
|
||||
|
||||
Reference in New Issue
Block a user