diff --git a/apps/scandic-web/components/ContentType/DestinationPage/DestinationCityPage/index.tsx b/apps/scandic-web/components/ContentType/DestinationPage/DestinationCityPage/index.tsx index ddf46f4e2..782264645 100644 --- a/apps/scandic-web/components/ContentType/DestinationPage/DestinationCityPage/index.tsx +++ b/apps/scandic-web/components/ContentType/DestinationPage/DestinationCityPage/index.tsx @@ -7,7 +7,6 @@ import { getDestinationCityPage } from "@/lib/trpc/memoizedRequests" import Blocks from "@/components/Blocks" import Breadcrumbs from "@/components/Breadcrumbs" import Body from "@/components/TempDesignSystem/Text/Body" -import TrackingSDK from "@/components/TrackingSDK" import ExperienceList from "../ExperienceList" import HotelDataContainer, { preload } from "../HotelDataContainer" @@ -16,6 +15,7 @@ import SidebarContentWrapper from "../SidebarContentWrapper" import DestinationPageSidePeek from "../Sidepeek" import StaticMap from "../StaticMap" import TopImages from "../TopImages" +import DestinationTracking from "../Tracking" import CityMap from "./CityMap" import DestinationCityPageSkeleton from "./DestinationCityPageSkeleton" @@ -65,6 +65,7 @@ export default async function DestinationCityPage() { )} @@ -85,7 +86,7 @@ export default async function DestinationCityPage() { /> - + ) } diff --git a/apps/scandic-web/components/ContentType/DestinationPage/DestinationCountryPage/index.tsx b/apps/scandic-web/components/ContentType/DestinationPage/DestinationCountryPage/index.tsx index ad1a738eb..f027a2790 100644 --- a/apps/scandic-web/components/ContentType/DestinationPage/DestinationCountryPage/index.tsx +++ b/apps/scandic-web/components/ContentType/DestinationPage/DestinationCountryPage/index.tsx @@ -7,7 +7,6 @@ import Blocks from "@/components/Blocks" import Breadcrumbs from "@/components/Breadcrumbs" import BreadcrumbsSkeleton from "@/components/TempDesignSystem/Breadcrumbs/BreadcrumbsSkeleton" import Body from "@/components/TempDesignSystem/Text/Body" -import TrackingSDK from "@/components/TrackingSDK" import CityDataContainer, { preload } from "../CityDataContainer" import CityListing from "../CityListing" @@ -16,6 +15,7 @@ import SidebarContentWrapper from "../SidebarContentWrapper" import DestinationPageSidePeek from "../Sidepeek" import StaticMap from "../StaticMap" import TopImages from "../TopImages" +import DestinationTracking from "../Tracking" import CountryMap from "./CountryMap" import DestinationCountryPageSkeleton from "./DestinationCountryPageSkeleton" @@ -69,6 +69,7 @@ export default async function DestinationCountryPage() { )} - + ) } diff --git a/apps/scandic-web/components/ContentType/DestinationPage/Map/MapContent/ClusterMarker/index.tsx b/apps/scandic-web/components/ContentType/DestinationPage/Map/MapContent/ClusterMarker/index.tsx index e1b7c5406..415fd8260 100644 --- a/apps/scandic-web/components/ContentType/DestinationPage/Map/MapContent/ClusterMarker/index.tsx +++ b/apps/scandic-web/components/ContentType/DestinationPage/Map/MapContent/ClusterMarker/index.tsx @@ -8,6 +8,8 @@ import { useCallback } from "react" import { useDestinationPageHotelsMapStore } from "@/stores/destination-page-hotels-map" +import { trackMapClick } from "@/utils/tracking/destinationPage" + import styles from "./clusterMarker.module.css" interface ClusterMarkerProps { @@ -34,7 +36,8 @@ export default function ClusterMarker({ if (onMarkerClick) { onMarkerClick(position) } - }, [onMarkerClick, position]) + trackMapClick(`cluster with hotelIds: ${hotelIds.join(",")}`) + }, [onMarkerClick, position, hotelIds]) return ( { setClickedHotel(properties.id) + trackMapClick(properties.name) }, [setClickedHotel, properties]) function handleCloseCard() { diff --git a/apps/scandic-web/components/ContentType/DestinationPage/Sidepeek/index.tsx b/apps/scandic-web/components/ContentType/DestinationPage/Sidepeek/index.tsx index e52097ff0..ff4fbf191 100644 --- a/apps/scandic-web/components/ContentType/DestinationPage/Sidepeek/index.tsx +++ b/apps/scandic-web/components/ContentType/DestinationPage/Sidepeek/index.tsx @@ -6,6 +6,7 @@ import { ChevronRightSmallIcon } from "@/components/Icons" import JsonToHtml from "@/components/JsonToHtml" import Button from "@/components/TempDesignSystem/Button" import SidePeek from "@/components/TempDesignSystem/SidePeek" +import { trackOpenSidePeekOnDestinationPagesEvent } from "@/utils/tracking/destinationPage" import type { DestinationCityPageData } from "@/types/trpc/routers/contentstack/destinationCityPage" import type { DestinationCountryPageData } from "@/types/trpc/routers/contentstack/destinationCountryPage" @@ -16,18 +17,25 @@ interface DestinationPageSidepeekProps { | DestinationCityPageData["sidepeek_content"] | DestinationCountryPageData["sidepeek_content"] > + location: string } export default function DestinationPageSidepeek({ buttonText, sidePeekContent, + location, }: DestinationPageSidepeekProps) { const [sidePeekIsOpen, setSidePeekIsOpen] = useState(false) const { heading, content } = sidePeekContent + function handleButtonClick() { + setSidePeekIsOpen(true) + trackOpenSidePeekOnDestinationPagesEvent(location) + } + return (