diff --git a/packages/site/app/Accompagnement.tsx b/packages/site/app/Accompagnement.tsx index 45882f6f78..73367feb03 100644 --- a/packages/site/app/Accompagnement.tsx +++ b/packages/site/app/Accompagnement.tsx @@ -1,6 +1,6 @@ 'use client'; -import { Button } from '@tet/ui'; +import { Button, useEventTracker } from '@tet/ui'; import { StrapiItem } from '@tet/site/src/strapi/StrapiItem'; import { StrapiImage } from '@tet/site/components/strapiImage/StrapiImage'; import Section from '@tet/site/components/sections/Section'; @@ -22,6 +22,8 @@ const Accompagnement = ({ description, contenu, }: AccompagnementProps) => { + const tracker = useEventTracker('site/accueil'); + return (
- diff --git a/packages/site/app/DemandeContact.tsx b/packages/site/app/DemandeContact.tsx index b17fbe3045..f546ed47c3 100644 --- a/packages/site/app/DemandeContact.tsx +++ b/packages/site/app/DemandeContact.tsx @@ -1,7 +1,7 @@ 'use client'; import Section from '@tet/site/components/sections/Section'; -import { Button } from '@tet/ui'; +import { Button, useEventTracker } from '@tet/ui'; type DemandeContactProps = { description: string; @@ -9,6 +9,8 @@ type DemandeContactProps = { }; const DemandeContact = ({ description, cta }: DemandeContactProps) => { + const tracker = useEventTracker('site/accueil'); + return (
{

{description}

- diff --git a/packages/site/app/TrackPage.tsx b/packages/site/app/TrackPage.tsx deleted file mode 100644 index 6ac0524fc1..0000000000 --- a/packages/site/app/TrackPage.tsx +++ /dev/null @@ -1,16 +0,0 @@ -'use client'; - -import {usePathname} from 'next/navigation'; -import {TrackUnplannedPageView} from '@tet/ui'; - -const TrackPage = () => { - const pathName = usePathname(); - - return ( - - ); -}; - -export default TrackPage; diff --git a/packages/site/app/contact/ContactForm.tsx b/packages/site/app/contact/ContactForm.tsx index 52728c1214..5baac9bd20 100644 --- a/packages/site/app/contact/ContactForm.tsx +++ b/packages/site/app/contact/ContactForm.tsx @@ -5,7 +5,7 @@ import classNames from 'classnames'; import { useEffect, useState } from 'react'; import { supabase } from '../initSupabase'; import { options } from './data'; -import { Button } from '@tet/ui'; +import { Button, useEventTracker } from '@tet/ui'; import { useRouter, useSearchParams } from 'next/navigation'; type FormData = { @@ -32,6 +32,7 @@ const ContactForm = () => { const searchParams = useSearchParams(); const router = useRouter(); + const tracker = useEventTracker('site/contact'); const objet = searchParams.get('objet'); @@ -118,7 +119,12 @@ const ContactForm = () => { return ( <> -
+ { + handleSubmit(event); + tracker('envoyer_message', {}); + }} + >