Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
100 changes: 42 additions & 58 deletions app/[locale]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import GetStartedGrid from "@/components/Homepage/GetStartedGrid"
import TrustLogos from "@/components/Homepage/TrustLogos"
import I18nProvider from "@/components/I18nProvider"
import MainArticle from "@/components/MainArticle"
import { TrackedSection } from "@/components/TrackedSection"
import { LinkWithArrow } from "@/components/ui/Link"
import { SectionHeader, SectionTag } from "@/components/ui/section"

Expand Down Expand Up @@ -82,63 +81,48 @@ const Page = async (props: { params: Promise<PageParams> }) => {
<HomeHero eventCategory={eventCategory} />

<div className="my-24 w-full space-y-24 px-4 md:mx-6 lg:my-32 lg:space-y-32">
<TrackedSection id="kpi" eventCategory={eventCategory}>
<KPISection
accountHolders={accountHolders}
transactionsToday={transactionsToday}
className="py-12"
/>
</TrackedSection>

<TrackedSection id="savings_carousel" eventCategory={eventCategory}>
<SavingsCarousel
className="py-12"
eventCategory={eventCategory}
/>
</TrackedSection>

<TrackedSection id="trust_logos" eventCategory={eventCategory}>
<TrustLogos className="py-12" eventCategory={eventCategory} />
</TrackedSection>

<TrackedSection id="simulator" eventCategory={eventCategory}>
<SimulatorSection
className="py-12"
header={
<div className="flex flex-col items-center gap-4 text-center">
<SectionTag variant="plain">
{t("page-index-simulator-tag")}
</SectionTag>
<SectionHeader className="mt-0 mb-0 leading-tight lg:text-6xl">
{t("page-index-simulator-title")}
</SectionHeader>
<p className="text-lg text-body-medium md:text-xl">
{t("page-index-simulator-subtitle")}
</p>
</div>
}
footer={
<LinkWithArrow
href="/guides/"
customEventOptions={{
eventCategory,
eventAction: "section_click",
eventName: "simulator/explore_guides",
}}
>
{t("page-index-simulator-cta")}
</LinkWithArrow>
}
/>
</TrackedSection>

<TrackedSection id="feature_cards" eventCategory={eventCategory}>
<FeatureCards eventCategory={eventCategory} />
</TrackedSection>

<TrackedSection id="get_started" eventCategory={eventCategory}>
<GetStartedGrid eventCategory={eventCategory} />
</TrackedSection>
<KPISection
accountHolders={accountHolders}
transactionsToday={transactionsToday}
className="py-12"
/>

<SavingsCarousel className="py-12" eventCategory={eventCategory} />

<TrustLogos className="py-12" eventCategory={eventCategory} />

<SimulatorSection
className="py-12"
header={
<div className="flex flex-col items-center gap-4 text-center">
<SectionTag variant="plain">
{t("page-index-simulator-tag")}
</SectionTag>
<SectionHeader className="mt-0 mb-0 leading-tight lg:text-6xl">
{t("page-index-simulator-title")}
</SectionHeader>
<p className="text-lg text-body-medium md:text-xl">
{t("page-index-simulator-subtitle")}
</p>
</div>
}
footer={
<LinkWithArrow
href="/guides/"
customEventOptions={{
eventCategory,
eventAction: "section_click",
eventName: "simulator/explore_guides",
}}
>
{t("page-index-simulator-cta")}
</LinkWithArrow>
}
/>

<FeatureCards eventCategory={eventCategory} />

<GetStartedGrid eventCategory={eventCategory} />
</div>
</MainArticle>
</I18nProvider>
Expand Down
54 changes: 0 additions & 54 deletions src/components/TrackedSection.tsx

This file was deleted.

3 changes: 3 additions & 0 deletions src/lib/utils/matomo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ const scheduleIdleCallback =
? requestIdleCallback
: (cb: () => void) => setTimeout(cb, 0)

// Use only for user-initiated actions (clicks, submits, swipes). Passive
// visibility/scroll tracking inflates `nb_actions` and breaks bounce-rate
// comparability with pages that don't auto-fire events.
export const trackCustomEvent = ({
eventCategory,
eventAction,
Expand Down
Loading