diff --git a/.prettierignore b/.prettierignore index fcc0ffd5a..86e8b8b22 100644 --- a/.prettierignore +++ b/.prettierignore @@ -2,6 +2,6 @@ dist .dist storybook-static site/source/locales/*.yaml -site/source/ATInternetTracking/smarttag.js +site/source/components/ATInternetTracking/smarttag.js *.yaml.d.ts .yarnrc.yml \ No newline at end of file diff --git a/site/source/Provider.tsx b/site/source/Provider.tsx index 747609189..cc686c8b2 100644 --- a/site/source/Provider.tsx +++ b/site/source/Provider.tsx @@ -18,10 +18,9 @@ import { Body, Intro } from '@/design-system/typography/paragraphs' import { useIframeResizer } from '@/hooks/useIframeResizer' import logo from '@/images/logo-monentreprise.svg' -// ATInternet Tracking -import { TrackingContext } from './ATInternetTracking' -import { createTracker } from './ATInternetTracking/Tracker' import { ServiceWorker } from './ServiceWorker' +import { TrackingContext } from './components/ATInternetTracking' +import { createTracker } from './components/ATInternetTracking/Tracker' import { DarkModeProvider } from './contexts/DarkModeContext' import { Message } from './design-system' import * as safeLocalStorage from './storage/safeLocalStorage' diff --git a/site/source/ATInternetTracking/.eslintrc.yaml b/site/source/components/ATInternetTracking/.eslintrc.yaml similarity index 100% rename from site/source/ATInternetTracking/.eslintrc.yaml rename to site/source/components/ATInternetTracking/.eslintrc.yaml diff --git a/site/source/ATInternetTracking/Tracker.ts b/site/source/components/ATInternetTracking/Tracker.ts similarity index 100% rename from site/source/ATInternetTracking/Tracker.ts rename to site/source/components/ATInternetTracking/Tracker.ts diff --git a/site/source/ATInternetTracking/index.tsx b/site/source/components/ATInternetTracking/index.tsx similarity index 100% rename from site/source/ATInternetTracking/index.tsx rename to site/source/components/ATInternetTracking/index.tsx diff --git a/site/source/ATInternetTracking/smarttag.js b/site/source/components/ATInternetTracking/smarttag.js similarity index 100% rename from site/source/ATInternetTracking/smarttag.js rename to site/source/components/ATInternetTracking/smarttag.js diff --git a/site/source/components/Feedback/index.tsx b/site/source/components/Feedback/index.tsx index 3d0ba2fee..d2593f7c0 100644 --- a/site/source/components/Feedback/index.tsx +++ b/site/source/components/Feedback/index.tsx @@ -3,7 +3,7 @@ import { Trans, useTranslation } from 'react-i18next' import { useLocation } from 'react-router-dom' import styled from 'styled-components' -import { TrackingContext } from '@/ATInternetTracking' +import { TrackingContext } from '@/components/ATInternetTracking' import { Popover } from '@/design-system' import { Button } from '@/design-system/buttons' import { Emoji } from '@/design-system/emoji' diff --git a/site/source/components/PageData.tsx b/site/source/components/PageData.tsx index bbd251963..a901939dd 100644 --- a/site/source/components/PageData.tsx +++ b/site/source/components/PageData.tsx @@ -15,8 +15,8 @@ import { Intro } from '@/design-system/typography/paragraphs' import { useCurrentSimulatorData } from '@/hooks/useCurrentSimulatorData' import { situationSelector } from '@/selectors/simulationSelectors' -import { TrackChapter } from '../ATInternetTracking' import { NextSteps } from '../pages/Simulateurs/NextSteps' +import { TrackChapter } from './ATInternetTracking' import BetaBanner from './BetaBanner' export default function PageData() { diff --git a/site/source/components/ShareSimulationBanner/ShareSimulationPopup.tsx b/site/source/components/ShareSimulationBanner/ShareSimulationPopup.tsx index 1ed0a0c4d..fd12dfec1 100644 --- a/site/source/components/ShareSimulationBanner/ShareSimulationPopup.tsx +++ b/site/source/components/ShareSimulationBanner/ShareSimulationPopup.tsx @@ -8,7 +8,7 @@ import { Strong } from '@/design-system/typography' import { H3 } from '@/design-system/typography/heading' import { Body, Intro, SmallBody } from '@/design-system/typography/paragraphs' -import { TrackingContext } from '../../ATInternetTracking' +import { TrackingContext } from '../ATInternetTracking' export function ShareSimulationPopup({ url }: { url: string }) { const inputRef = useRef(null) diff --git a/site/source/components/ShareSimulationBanner/index.tsx b/site/source/components/ShareSimulationBanner/index.tsx index d60cb1fb2..131ee6b00 100644 --- a/site/source/components/ShareSimulationBanner/index.tsx +++ b/site/source/components/ShareSimulationBanner/index.tsx @@ -13,7 +13,7 @@ import { situationSelector, } from '@/selectors/simulationSelectors' -import { TrackingContext } from '../../ATInternetTracking' +import { TrackingContext } from '../ATInternetTracking' import { PlaceDesEntreprisesButton } from '../PlaceDesEntreprises' import { useParamsFromSituation } from '../utils/useSearchParamsSimulationSharing' import { ShareSimulationPopup } from './ShareSimulationPopup' diff --git a/site/source/components/Simulation/index.tsx b/site/source/components/Simulation/index.tsx index f6a5f82b3..1b44d3b40 100644 --- a/site/source/components/Simulation/index.tsx +++ b/site/source/components/Simulation/index.tsx @@ -15,7 +15,7 @@ import { firstStepCompletedSelector, } from '@/selectors/simulationSelectors' -import { TrackPage } from '../../ATInternetTracking' +import { TrackPage } from '../ATInternetTracking' import Banner from '../Banner' import AnswerList from '../conversation/AnswerList' import PrintExportRecover from '../simulationExplanation/PrintExportRecover' diff --git a/site/source/components/conversation/Conversation.tsx b/site/source/components/conversation/Conversation.tsx index 1226f9c53..ea62b8786 100644 --- a/site/source/components/conversation/Conversation.tsx +++ b/site/source/components/conversation/Conversation.tsx @@ -21,7 +21,7 @@ import { } from '@/selectors/simulationSelectors' import { evaluateQuestion } from '@/utils' -import { TrackPage } from '../../ATInternetTracking' +import { TrackPage } from '../ATInternetTracking' import { JeDonneMonAvis } from '../JeDonneMonAvis' import { FromTop } from '../ui/animate' import AnswerList from './AnswerList' diff --git a/site/source/components/layout/Footer/Privacy.tsx b/site/source/components/layout/Footer/Privacy.tsx index 2059d2f83..a19c5f8f3 100644 --- a/site/source/components/layout/Footer/Privacy.tsx +++ b/site/source/components/layout/Footer/Privacy.tsx @@ -6,8 +6,8 @@ import { Checkbox } from '@/design-system/field' import { Link } from '@/design-system/typography/link' import { Body, SmallBody } from '@/design-system/typography/paragraphs' -import { TrackPage, TrackingContext } from '../../../ATInternetTracking' import * as safeLocalStorage from '../../../storage/safeLocalStorage' +import { TrackPage, TrackingContext } from '../../ATInternetTracking' export default function Privacy({ label, diff --git a/site/source/pages/Accessibilité.tsx b/site/source/pages/Accessibilité.tsx index e74706f2f..11d2fe671 100644 --- a/site/source/pages/Accessibilité.tsx +++ b/site/source/pages/Accessibilité.tsx @@ -5,7 +5,7 @@ import { Link } from '@/design-system/typography/link' import { Li, Ul } from '@/design-system/typography/list' import { Body, SmallBody } from '@/design-system/typography/paragraphs' -import { TrackPage } from '../ATInternetTracking' +import { TrackPage } from '../components/ATInternetTracking' import Meta from '../components/utils/Meta' export default function Accessibilité() { diff --git a/site/source/pages/Budget/Budget.tsx b/site/source/pages/Budget/Budget.tsx index e0c08e52d..f2deef521 100644 --- a/site/source/pages/Budget/Budget.tsx +++ b/site/source/pages/Budget/Budget.tsx @@ -3,6 +3,7 @@ import { useState } from 'react' import { useTranslation } from 'react-i18next' import styled from 'styled-components' +import { TrackPage } from '@/components/ATInternetTracking' import MoreInfosOnUs from '@/components/MoreInfosOnUs' import { ScrollToTop } from '@/components/utils/Scroll' import { Markdown } from '@/components/utils/markdown' @@ -12,7 +13,6 @@ import { Grid } from '@/design-system/layout' import { H1, H2 } from '@/design-system/typography/heading' import { Body } from '@/design-system/typography/paragraphs' -import { TrackPage } from '../../ATInternetTracking' import Meta from '../../components/utils/Meta' import prose from './budget.md?raw' import budget from './budget.yaml' diff --git a/site/source/pages/Creer/AfterRegistration.tsx b/site/source/pages/Creer/AfterRegistration.tsx index c2dd06bf5..170e90672 100644 --- a/site/source/pages/Creer/AfterRegistration.tsx +++ b/site/source/pages/Creer/AfterRegistration.tsx @@ -1,6 +1,7 @@ import { Trans, useTranslation } from 'react-i18next' import { useSelector } from 'react-redux' +import { TrackPage } from '@/components/ATInternetTracking' import { FromBottom } from '@/components/ui/animate' import DefaultHelmet from '@/components/utils/DefaultHelmet' import { ScrollToTop } from '@/components/utils/Scroll' @@ -10,7 +11,6 @@ import { Body } from '@/design-system/typography/paragraphs' import { RootState } from '@/reducers/rootReducer' import { useSitePaths } from '@/sitePaths' -import { TrackPage } from '../../ATInternetTracking' import siret from './siret.jpg' export default function AfterRegistration() { diff --git a/site/source/pages/Creer/CreationChecklist.tsx b/site/source/pages/Creer/CreationChecklist.tsx index e1e9f2721..40446f01e 100644 --- a/site/source/pages/Creer/CreationChecklist.tsx +++ b/site/source/pages/Creer/CreationChecklist.tsx @@ -6,6 +6,7 @@ import { initializeCompanyCreationChecklist, } from '@/actions/companyCreationChecklistActions' import { resetCompanyStatusChoice } from '@/actions/companyStatusActions' +import { TrackPage } from '@/components/ATInternetTracking' import { CheckItem, Checklist } from '@/components/ui/Checklist' import { FromBottom } from '@/components/ui/animate' import DefaultHelmet from '@/components/utils/DefaultHelmet' @@ -22,7 +23,6 @@ import { RootState } from '@/reducers/rootReducer' import { LegalStatus } from '@/selectors/companyStatusSelectors' import { useSitePaths } from '@/sitePaths' -import { TrackPage } from '../../ATInternetTracking' import StatutDescription from './StatutDescription' type CreateCompanyProps = { diff --git a/site/source/pages/Creer/GuideStatut/AutoEntrepreneur.tsx b/site/source/pages/Creer/GuideStatut/AutoEntrepreneur.tsx index 1e5dd1d68..42c505e3c 100644 --- a/site/source/pages/Creer/GuideStatut/AutoEntrepreneur.tsx +++ b/site/source/pages/Creer/GuideStatut/AutoEntrepreneur.tsx @@ -1,13 +1,12 @@ import { Trans, useTranslation } from 'react-i18next' +import { TrackPage } from '@/components/ATInternetTracking' import SchemeComparaison from '@/components/SchemeComparaison' import DefaultHelmet from '@/components/utils/DefaultHelmet' import { H2 } from '@/design-system/typography/heading' import { Link } from '@/design-system/typography/link' import { Body } from '@/design-system/typography/paragraphs' -import { TrackPage } from '../../../ATInternetTracking' - export default function Autoentrepreneur() { const { t } = useTranslation() diff --git a/site/source/pages/Creer/GuideStatut/DirectorStatus.tsx b/site/source/pages/Creer/GuideStatut/DirectorStatus.tsx index 620558515..7383fadd3 100644 --- a/site/source/pages/Creer/GuideStatut/DirectorStatus.tsx +++ b/site/source/pages/Creer/GuideStatut/DirectorStatus.tsx @@ -1,12 +1,11 @@ import { Trans, useTranslation } from 'react-i18next' +import { TrackPage } from '@/components/ATInternetTracking' import SchemeComparaison from '@/components/SchemeComparaison' import DefaultHelmet from '@/components/utils/DefaultHelmet' import { H2 } from '@/design-system/typography/heading' import { Body } from '@/design-system/typography/paragraphs' -import { TrackPage } from '../../../ATInternetTracking' - export default function DefineDirectorStatus() { const { t } = useTranslation() diff --git a/site/source/pages/Creer/GuideStatut/MinorityDirector.tsx b/site/source/pages/Creer/GuideStatut/MinorityDirector.tsx index 25f52ae5e..3f28f86b1 100644 --- a/site/source/pages/Creer/GuideStatut/MinorityDirector.tsx +++ b/site/source/pages/Creer/GuideStatut/MinorityDirector.tsx @@ -4,6 +4,7 @@ import { directorIsInAMinority, useDispatchAndGoToNextQuestion, } from '@/actions/companyStatusActions' +import { TrackPage } from '@/components/ATInternetTracking' import DefaultHelmet from '@/components/utils/DefaultHelmet' import AnswerGroup from '@/design-system/answer-group' import { Button } from '@/design-system/buttons' @@ -11,8 +12,6 @@ import { H2 } from '@/design-system/typography/heading' import { Li, Ul } from '@/design-system/typography/list' import { Body } from '@/design-system/typography/paragraphs' -import { TrackPage } from '../../../ATInternetTracking' - export default function MinorityDirector() { const { t } = useTranslation() const dispatch = useDispatchAndGoToNextQuestion() diff --git a/site/source/pages/Creer/GuideStatut/NumberOfAssociate.tsx b/site/source/pages/Creer/GuideStatut/NumberOfAssociate.tsx index 3576bf6e7..a054dfbc4 100644 --- a/site/source/pages/Creer/GuideStatut/NumberOfAssociate.tsx +++ b/site/source/pages/Creer/GuideStatut/NumberOfAssociate.tsx @@ -4,14 +4,13 @@ import { companyHasMultipleAssociates, useDispatchAndGoToNextQuestion, } from '@/actions/companyStatusActions' +import { TrackPage } from '@/components/ATInternetTracking' import DefaultHelmet from '@/components/utils/DefaultHelmet' import AnswerGroup from '@/design-system/answer-group' import { Button } from '@/design-system/buttons' import { H2 } from '@/design-system/typography/heading' import { Body, SmallBody } from '@/design-system/typography/paragraphs' -import { TrackPage } from '../../../ATInternetTracking' - export default function NumberOfAssociates() { const dispatch = useDispatchAndGoToNextQuestion() const { t } = useTranslation() diff --git a/site/source/pages/Creer/GuideStatut/PickLegalStatus.tsx b/site/source/pages/Creer/GuideStatut/PickLegalStatus.tsx index 156af60c9..c8dcfc7b5 100644 --- a/site/source/pages/Creer/GuideStatut/PickLegalStatus.tsx +++ b/site/source/pages/Creer/GuideStatut/PickLegalStatus.tsx @@ -2,6 +2,7 @@ import { Fragment } from 'react' import { Trans, useTranslation } from 'react-i18next' import { useSelector } from 'react-redux' +import { TrackPage } from '@/components/ATInternetTracking' import DefaultHelmet from '@/components/utils/DefaultHelmet' import { Button } from '@/design-system/buttons' import { H2, H3 } from '@/design-system/typography/heading' @@ -12,7 +13,6 @@ import { } from '@/selectors/companyStatusSelectors' import { useSitePaths } from '@/sitePaths' -import { TrackPage } from '../../../ATInternetTracking' import StatutDescription from '../StatutDescription' type StatutButtonProps = { diff --git a/site/source/pages/Creer/GuideStatut/SoleProprietorship.tsx b/site/source/pages/Creer/GuideStatut/SoleProprietorship.tsx index 07a05bbb4..798b5ae11 100644 --- a/site/source/pages/Creer/GuideStatut/SoleProprietorship.tsx +++ b/site/source/pages/Creer/GuideStatut/SoleProprietorship.tsx @@ -4,6 +4,7 @@ import { isSoleProprietorship, useDispatchAndGoToNextQuestion, } from '@/actions/companyStatusActions' +import { TrackPage } from '@/components/ATInternetTracking' import DefaultHelmet from '@/components/utils/DefaultHelmet' import AnswerGroup from '@/design-system/answer-group' import { Button } from '@/design-system/buttons' @@ -11,8 +12,6 @@ import { H2 } from '@/design-system/typography/heading' import { Li, Ul } from '@/design-system/typography/list' import { Body } from '@/design-system/typography/paragraphs' -import { TrackPage } from '../../../ATInternetTracking' - export default function SoleProprietorship() { const dispatch = useDispatchAndGoToNextQuestion() const { t } = useTranslation() diff --git a/site/source/pages/Creer/GuideStatut/index.tsx b/site/source/pages/Creer/GuideStatut/index.tsx index ff45d6db2..b7a230545 100644 --- a/site/source/pages/Creer/GuideStatut/index.tsx +++ b/site/source/pages/Creer/GuideStatut/index.tsx @@ -4,13 +4,13 @@ import { useDispatch, useSelector } from 'react-redux' import { Navigate, Route, Routes, useLocation } from 'react-router-dom' import { resetCompanyStatusChoice } from '@/actions/companyStatusActions' +import { TrackChapter } from '@/components/ATInternetTracking' import { FromBottom } from '@/components/ui/animate' import { H1 } from '@/design-system/typography/heading' import { Link } from '@/design-system/typography/link' import { RootState } from '@/reducers/rootReducer' import { useSitePaths } from '@/sitePaths' -import { TrackChapter } from '../../../ATInternetTracking' import AutoEntrepreneur from './AutoEntrepreneur' import DirectorStatus from './DirectorStatus' import MinorityDirector from './MinorityDirector' diff --git a/site/source/pages/Creer/choix-statut/Home.tsx b/site/source/pages/Creer/choix-statut/Home.tsx index 8d8f7d20f..e1025b6a7 100644 --- a/site/source/pages/Creer/choix-statut/Home.tsx +++ b/site/source/pages/Creer/choix-statut/Home.tsx @@ -1,6 +1,7 @@ import { Trans, useTranslation } from 'react-i18next' import { useSelector } from 'react-redux' +import { TrackPage } from '@/components/ATInternetTracking' import PageHeader from '@/components/PageHeader' import { FromBottom } from '@/components/ui/animate' import Meta from '@/components/utils/Meta' @@ -14,7 +15,6 @@ import { RootState } from '@/reducers/rootReducer' import { useNextQuestionUrl } from '@/selectors/companyStatusSelectors' import { useSitePaths } from '@/sitePaths' -import { TrackPage } from '../../../ATInternetTracking' import { SimulateurCard } from '../../Simulateurs/Home' import créerSvg from './créer.svg' diff --git a/site/source/pages/Creer/index.tsx b/site/source/pages/Creer/index.tsx index 7d8b920c5..59cc5e20e 100644 --- a/site/source/pages/Creer/index.tsx +++ b/site/source/pages/Creer/index.tsx @@ -1,8 +1,8 @@ import { Route, Routes, useLocation } from 'react-router-dom' +import { TrackChapter } from '@/components/ATInternetTracking' import { ScrollToTop } from '@/components/utils/Scroll' -import { TrackChapter } from '../../ATInternetTracking' import { LANDING_LEGAL_STATUS_LIST, useSitePaths } from '../../sitePaths' import AfterRegistration from './AfterRegistration' import CreationChecklist from './CreationChecklist' diff --git a/site/source/pages/Documentation.tsx b/site/source/pages/Documentation.tsx index 11d62ac88..60ce471ce 100644 --- a/site/source/pages/Documentation.tsx +++ b/site/source/pages/Documentation.tsx @@ -31,7 +31,7 @@ import { Body } from '@/design-system/typography/paragraphs' import { RootState } from '@/reducers/rootReducer' import { useSitePaths } from '@/sitePaths' -import { TrackPage } from '../ATInternetTracking' +import { TrackPage } from '../components/ATInternetTracking' import RuleLink from '../components/RuleLink' export default function Documentation({ diff --git a/site/source/pages/Landing/Landing.tsx b/site/source/pages/Landing/Landing.tsx index 2622cc73a..e58368ff8 100644 --- a/site/source/pages/Landing/Landing.tsx +++ b/site/source/pages/Landing/Landing.tsx @@ -1,6 +1,7 @@ import { Trans, useTranslation } from 'react-i18next' import styled from 'styled-components' +import { TrackPage } from '@/components/ATInternetTracking' import PageHeader from '@/components/PageHeader' import Footer from '@/components/layout/Footer/Footer' import Header from '@/components/layout/Header' @@ -14,7 +15,6 @@ import { useGetFullURL } from '@/hooks/useGetFullURL' import useSimulatorsData from '@/hooks/useSimulatorsData' import { useSitePaths } from '@/sitePaths' -import { TrackPage } from '../../ATInternetTracking' import { SimulateurCard } from '../Simulateurs/Home' import SearchOrCreate from './SearchOrCreate' import illustration2Svg from './illustration2.svg' diff --git a/site/source/pages/Nouveautes/Nouveautes.tsx b/site/source/pages/Nouveautes/Nouveautes.tsx index 67eccd0e1..d7f9df44a 100644 --- a/site/source/pages/Nouveautes/Nouveautes.tsx +++ b/site/source/pages/Nouveautes/Nouveautes.tsx @@ -3,6 +3,7 @@ import { useTranslation } from 'react-i18next' import { Navigate, useMatch, useNavigate } from 'react-router-dom' import styled from 'styled-components' +import { TrackPage } from '@/components/ATInternetTracking' import MoreInfosOnUs from '@/components/MoreInfosOnUs' import { determinant, useHideNewsBanner } from '@/components/layout/NewsBanner' import Meta from '@/components/utils/Meta' @@ -20,8 +21,6 @@ import { Body } from '@/design-system/typography/paragraphs' import { useFetchData } from '@/hooks/useFetchData' import { useSitePaths } from '@/sitePaths' -import { TrackPage } from '../../ATInternetTracking' - const slugify = (name: string) => name.toLowerCase().replace(' ', '-') type Releases = typeof import('@/public/data/releases.json') diff --git a/site/source/pages/Plan.tsx b/site/source/pages/Plan.tsx index 41c2bc130..f7bf9dc81 100644 --- a/site/source/pages/Plan.tsx +++ b/site/source/pages/Plan.tsx @@ -7,7 +7,7 @@ import { Li, Ul } from '@/design-system/typography/list' import useSimulatorsData from '@/hooks/useSimulatorsData' import { useSitePaths } from '@/sitePaths' -import { TrackPage } from '../ATInternetTracking' +import { TrackPage } from '../components/ATInternetTracking' import Meta from '../components/utils/Meta' export default function Plan() { diff --git a/site/source/pages/Simulateurs/Home.tsx b/site/source/pages/Simulateurs/Home.tsx index 776aaea8d..f339200d0 100644 --- a/site/source/pages/Simulateurs/Home.tsx +++ b/site/source/pages/Simulateurs/Home.tsx @@ -1,5 +1,6 @@ import { Trans, useTranslation } from 'react-i18next' +import { TrackPage } from '@/components/ATInternetTracking' import PageHeader from '@/components/PageHeader' import { useIsEmbedded } from '@/components/utils/useIsEmbedded' import { Chip } from '@/design-system' @@ -17,7 +18,6 @@ import { MergedSimulatorDataValues } from '@/hooks/useCurrentSimulatorData' import useSimulatorsData from '@/hooks/useSimulatorsData' import { useSitePaths } from '@/sitePaths' -import { TrackPage } from '../../ATInternetTracking' import Meta from '../../components/utils/Meta' import simulatorSvg from './images/illustration-simulateur.svg' diff --git a/site/source/pages/Simulateurs/exonération-covid/ExonérationCovid.tsx b/site/source/pages/Simulateurs/exonération-covid/ExonérationCovid.tsx index 10cd4a61e..b563f43e9 100644 --- a/site/source/pages/Simulateurs/exonération-covid/ExonérationCovid.tsx +++ b/site/source/pages/Simulateurs/exonération-covid/ExonérationCovid.tsx @@ -8,7 +8,7 @@ import { useSearchParams, } from 'react-router-dom' -import { TrackPage } from '@/ATInternetTracking' +import { TrackPage } from '@/components/ATInternetTracking' import { ExplicableRule } from '@/components/conversation/Explicable' import RuleInput from '@/components/conversation/RuleInput' import { diff --git a/site/source/pages/Simulateurs/impot-societe/index.tsx b/site/source/pages/Simulateurs/impot-societe/index.tsx index 473c8ffde..822eaa513 100644 --- a/site/source/pages/Simulateurs/impot-societe/index.tsx +++ b/site/source/pages/Simulateurs/impot-societe/index.tsx @@ -3,6 +3,7 @@ import { useDispatch, useSelector } from 'react-redux' import styled from 'styled-components' import { updateSituation } from '@/actions/actions' +import { TrackPage } from '@/components/ATInternetTracking' import Value from '@/components/EngineValue' import Notifications from '@/components/Notifications' import { SimulationGoal, SimulationGoals } from '@/components/Simulation' @@ -13,8 +14,6 @@ import { H2 } from '@/design-system/typography/heading' import { Body, Intro } from '@/design-system/typography/paragraphs' import { situationSelector } from '@/selectors/simulationSelectors' -import { TrackPage } from '../../../ATInternetTracking' - export default function ISSimulation() { return ( <> diff --git a/site/source/pages/Simulateurs/pamc/PAMCHome.tsx b/site/source/pages/Simulateurs/pamc/PAMCHome.tsx index 34c765142..dfe0d2dad 100644 --- a/site/source/pages/Simulateurs/pamc/PAMCHome.tsx +++ b/site/source/pages/Simulateurs/pamc/PAMCHome.tsx @@ -1,7 +1,7 @@ +import { TrackPage } from '@/components/ATInternetTracking' import { H2 } from '@/design-system/typography/heading' import useSimulatorsData from '@/hooks/useSimulatorsData' -import { TrackPage } from '../../../ATInternetTracking' import { SimulateurCard } from '../Home' export default function SalariéSimulation() { diff --git a/site/source/pages/Simulateurs/économie-collaborative/Activité.tsx b/site/source/pages/Simulateurs/économie-collaborative/Activité.tsx index 218ad57b4..630e01158 100644 --- a/site/source/pages/Simulateurs/économie-collaborative/Activité.tsx +++ b/site/source/pages/Simulateurs/économie-collaborative/Activité.tsx @@ -3,7 +3,7 @@ import { useContext } from 'react' import { Trans, useTranslation } from 'react-i18next' import { Navigate, useParams } from 'react-router-dom' -import { TrackPage } from '@/ATInternetTracking' +import { TrackPage } from '@/components/ATInternetTracking' import { FromBottom } from '@/components/ui/animate' import { ScrollToTop } from '@/components/utils/Scroll' import { Markdown } from '@/components/utils/markdown' diff --git a/site/source/pages/Simulateurs/économie-collaborative/ActivitésSelection.tsx b/site/source/pages/Simulateurs/économie-collaborative/ActivitésSelection.tsx index 6330018e8..b38b2113c 100644 --- a/site/source/pages/Simulateurs/économie-collaborative/ActivitésSelection.tsx +++ b/site/source/pages/Simulateurs/économie-collaborative/ActivitésSelection.tsx @@ -1,6 +1,7 @@ import { useContext } from 'react' import { Trans, useTranslation } from 'react-i18next' +import { TrackPage } from '@/components/ATInternetTracking' import { FromBottom } from '@/components/ui/animate' import { ScrollToTop } from '@/components/utils/Scroll' import { Emoji } from '@/design-system/emoji' @@ -8,7 +9,6 @@ import { Grid, Spacing } from '@/design-system/layout' import { H1, H2 } from '@/design-system/typography/heading' import { Body, SmallBody } from '@/design-system/typography/paragraphs' -import { TrackPage } from '../../../ATInternetTracking' import { ActiviteCard } from './ActiviteCard' import { Activity } from './Activité' import NextButton from './NextButton' diff --git a/site/source/pages/Simulateurs/économie-collaborative/VotreSituation.tsx b/site/source/pages/Simulateurs/économie-collaborative/VotreSituation.tsx index f2bf8dc07..fbb39f0cb 100644 --- a/site/source/pages/Simulateurs/économie-collaborative/VotreSituation.tsx +++ b/site/source/pages/Simulateurs/économie-collaborative/VotreSituation.tsx @@ -2,7 +2,7 @@ import { useContext } from 'react' import { Trans, useTranslation } from 'react-i18next' import { Navigate } from 'react-router-dom' -import { TrackPage } from '@/ATInternetTracking' +import { TrackPage } from '@/components/ATInternetTracking' import { FromBottom } from '@/components/ui/animate' import DefaultHelmet from '@/components/utils/DefaultHelmet' import { ScrollToTop } from '@/components/utils/Scroll' diff --git a/site/source/pages/Simulateurs/économie-collaborative/index.tsx b/site/source/pages/Simulateurs/économie-collaborative/index.tsx index 31027bdae..c8ccd81b4 100644 --- a/site/source/pages/Simulateurs/économie-collaborative/index.tsx +++ b/site/source/pages/Simulateurs/économie-collaborative/index.tsx @@ -2,7 +2,7 @@ import { Trans } from 'react-i18next' import { Route, Routes } from 'react-router-dom' import styled from 'styled-components' -import { TrackChapter } from '@/ATInternetTracking' +import { TrackChapter } from '@/components/ATInternetTracking' import { useIsEmbedded } from '@/components/utils/useIsEmbedded' import { Link } from '@/design-system/typography/link' import useSimulatorsData from '@/hooks/useSimulatorsData' diff --git a/site/source/pages/Stats/LazyStats.tsx b/site/source/pages/Stats/LazyStats.tsx index 3682b1f78..0ce9cf315 100644 --- a/site/source/pages/Stats/LazyStats.tsx +++ b/site/source/pages/Stats/LazyStats.tsx @@ -1,6 +1,7 @@ import { Suspense, lazy } from 'react' import { useTranslation } from 'react-i18next' +import { TrackPage } from '@/components/ATInternetTracking' import MoreInfosOnUs from '@/components/MoreInfosOnUs' import PageHeader from '@/components/PageHeader' import Privacy from '@/components/layout/Footer/Privacy' @@ -9,7 +10,6 @@ import { ScrollToTop } from '@/components/utils/Scroll' import { Emoji } from '@/design-system/emoji' import { Intro } from '@/design-system/typography/paragraphs' -import { TrackPage } from '../../ATInternetTracking' import illustrationSvg from './illustration.svg' const Stats = lazy(() => import('./Stats')) diff --git a/site/source/pages/Stats/Stats.tsx b/site/source/pages/Stats/Stats.tsx index 10b33b910..c19fcc416 100644 --- a/site/source/pages/Stats/Stats.tsx +++ b/site/source/pages/Stats/Stats.tsx @@ -5,6 +5,7 @@ import { useSearchParams } from 'react-router-dom' import { BrushProps } from 'recharts' import styled from 'styled-components' +import { toAtString } from '@/components/ATInternetTracking' import PagesChart from '@/components/charts/PagesCharts' import { useScrollToHash } from '@/components/utils/markdown' import { Message } from '@/design-system' @@ -18,7 +19,6 @@ import { Body, Intro } from '@/design-system/typography/paragraphs' import { useFetchData } from '@/hooks/useFetchData' import useSimulatorsData, { SimulatorData } from '@/hooks/useSimulatorsData' -import { toAtString } from '../../ATInternetTracking' import { debounce, groupBy } from '../../utils' import { SimulateurCard } from '../Simulateurs/Home' import Chart, { Data, isDataStacked } from './Chart' @@ -145,7 +145,6 @@ function groupByDate(data: Pageish[]) { .sort((a, b) => b[1] - a[1]) .slice(0, 8) .map(([page]) => page) - console.log(topPagesOfAllTime) return topTenPageByMonth.map(({ date, nombre }) => ({ date, diff --git a/site/source/pages/gerer/declaration-charges-sociales-independant/index.tsx b/site/source/pages/gerer/declaration-charges-sociales-independant/index.tsx index ffb45c89f..854170036 100644 --- a/site/source/pages/gerer/declaration-charges-sociales-independant/index.tsx +++ b/site/source/pages/gerer/declaration-charges-sociales-independant/index.tsx @@ -6,6 +6,7 @@ import { useDispatch, useSelector } from 'react-redux' import styled from 'styled-components' import { updateSituation } from '@/actions/actions' +import { TrackPage } from '@/components/ATInternetTracking' import { Condition, WhenAlreadyDefined } from '@/components/EngineValue' import PageHeader from '@/components/PageHeader' import RuleInput from '@/components/conversation/RuleInput' @@ -22,7 +23,6 @@ import { SimulationConfig } from '@/reducers/rootReducer' import { situationSelector } from '@/selectors/simulationSelectors' import { useSitePaths } from '@/sitePaths' -import { TrackPage } from '../../../ATInternetTracking' import { SimpleField, SubSection } from '../components/Fields' import { ExplicationsResultatFiscal } from './components/ExplicationResultatFiscal' import ResultatsSimples from './components/RésultatSimple' diff --git a/site/source/pages/gerer/declaration-revenu-independants/components/DéclarationRevenu.tsx b/site/source/pages/gerer/declaration-revenu-independants/components/DéclarationRevenu.tsx index 6af1ccd16..f0a52f391 100644 --- a/site/source/pages/gerer/declaration-revenu-independants/components/DéclarationRevenu.tsx +++ b/site/source/pages/gerer/declaration-revenu-independants/components/DéclarationRevenu.tsx @@ -5,8 +5,8 @@ import { useTranslation } from 'react-i18next' import { useDispatch } from 'react-redux' import styled, { css } from 'styled-components' -import { TrackPage } from '@/ATInternetTracking' import { updateSituation } from '@/actions/actions' +import { TrackPage } from '@/components/ATInternetTracking' import Value, { Condition } from '@/components/EngineValue' import ShareOrSaveSimulationBanner from '@/components/ShareSimulationBanner' import { ExplicableRule } from '@/components/conversation/Explicable' diff --git a/site/source/pages/gerer/declaration-revenu-independants/declaration.tsx b/site/source/pages/gerer/declaration-revenu-independants/declaration.tsx index 2d6eb33c5..6b2d784c9 100644 --- a/site/source/pages/gerer/declaration-revenu-independants/declaration.tsx +++ b/site/source/pages/gerer/declaration-revenu-independants/declaration.tsx @@ -4,7 +4,7 @@ import { RuleNode } from 'publicodes' import { useEffect, useState } from 'react' import { Trans, useTranslation } from 'react-i18next' -import { TrackPage } from '@/ATInternetTracking' +import { TrackPage } from '@/components/ATInternetTracking' import { Condition } from '@/components/EngineValue' import { FromTop } from '@/components/ui/animate' import { useEngine } from '@/components/utils/EngineContext' diff --git a/site/source/pages/gerer/declaration-revenu-independants/entreprise.tsx b/site/source/pages/gerer/declaration-revenu-independants/entreprise.tsx index 0e72b954c..dbf18c7db 100644 --- a/site/source/pages/gerer/declaration-revenu-independants/entreprise.tsx +++ b/site/source/pages/gerer/declaration-revenu-independants/entreprise.tsx @@ -2,9 +2,9 @@ import { DottedName } from 'modele-social' import { Trans } from 'react-i18next' import { useDispatch } from 'react-redux' -import { TrackPage } from '@/ATInternetTracking' import { resetSimulation } from '@/actions/actions' import { resetCompany } from '@/actions/companyActions' +import { TrackPage } from '@/components/ATInternetTracking' import { Condition, WhenAlreadyDefined, diff --git a/site/source/pages/gerer/declaration-revenu-independants/imposition.tsx b/site/source/pages/gerer/declaration-revenu-independants/imposition.tsx index 4cebb115b..06289580f 100644 --- a/site/source/pages/gerer/declaration-revenu-independants/imposition.tsx +++ b/site/source/pages/gerer/declaration-revenu-independants/imposition.tsx @@ -5,8 +5,8 @@ import { useCallback } from 'react' import { Trans, useTranslation } from 'react-i18next' import { useDispatch } from 'react-redux' -import { TrackPage } from '@/ATInternetTracking' import { updateSituation } from '@/actions/actions' +import { TrackPage } from '@/components/ATInternetTracking' import { Condition, WhenAlreadyDefined, diff --git a/site/source/pages/gerer/demande-mobilité/EndBlock.tsx b/site/source/pages/gerer/demande-mobilité/EndBlock.tsx index 95aa42492..ebc1efa4a 100644 --- a/site/source/pages/gerer/demande-mobilité/EndBlock.tsx +++ b/site/source/pages/gerer/demande-mobilité/EndBlock.tsx @@ -4,6 +4,7 @@ import { Suspense, lazy, useContext, useRef, useState } from 'react' import SignaturePad from 'react-signature-pad-wrapper' import { ThemeContext } from 'styled-components' +import { TrackPage, TrackingContext } from '@/components/ATInternetTracking' import { Condition } from '@/components/EngineValue' import { EngineContext, EngineProvider } from '@/components/utils/EngineContext' import { Message, PopoverWithTrigger } from '@/design-system' @@ -17,7 +18,6 @@ import { Link } from '@/design-system/typography/link' import { Li, Ul } from '@/design-system/typography/list' import { Body, Intro, SmallBody } from '@/design-system/typography/paragraphs' -import { TrackPage, TrackingContext } from '../../../ATInternetTracking' import PDFDocument from './PDFDocument' const IS_TOUCH_DEVICE = isOnTouchDevice() diff --git a/site/source/pages/gerer/demande-mobilité/index.tsx b/site/source/pages/gerer/demande-mobilité/index.tsx index f249b84c4..ae060a7a1 100644 --- a/site/source/pages/gerer/demande-mobilité/index.tsx +++ b/site/source/pages/gerer/demande-mobilité/index.tsx @@ -3,6 +3,7 @@ import Engine, { PublicodesExpression } from 'publicodes' import { Fragment, Suspense, lazy, useCallback, useContext } from 'react' import { Trans, useTranslation } from 'react-i18next' +import { TrackPage } from '@/components/ATInternetTracking' import { WhenApplicable, WhenNotApplicable } from '@/components/EngineValue' import RuleInput from '@/components/conversation/RuleInput' import BrowserOnly from '@/components/utils/BrowserOnly' @@ -25,7 +26,6 @@ import { omit, } from '@/utils' -import { TrackPage } from '../../../ATInternetTracking' import formulaire from './demande-mobilité.yaml' const LazyEndBlock = import.meta.env.SSR diff --git a/site/source/pages/gerer/embaucher.tsx b/site/source/pages/gerer/embaucher.tsx index eb8e7d532..407bc7fe8 100644 --- a/site/source/pages/gerer/embaucher.tsx +++ b/site/source/pages/gerer/embaucher.tsx @@ -5,6 +5,7 @@ import { checkHiringItem, initializeHiringChecklist, } from '@/actions/hiringChecklistAction' +import { TrackPage } from '@/components/ATInternetTracking' import { CheckItem, Checklist, ChecklistProps } from '@/components/ui/Checklist' import { FromBottom } from '@/components/ui/animate' import DefaultHelmet from '@/components/utils/DefaultHelmet' @@ -14,7 +15,6 @@ import { Li, Ul } from '@/design-system/typography/list' import { Body } from '@/design-system/typography/paragraphs' import { RootState } from '@/reducers/rootReducer' -import { TrackPage } from '../../ATInternetTracking' import { SimulatorRessourceCard } from '../Simulateurs/cards/SimulatorRessourceCard' type EmbaucherProps = { diff --git a/site/source/pages/gerer/index.tsx b/site/source/pages/gerer/index.tsx index 58ace8730..25fb2f938 100644 --- a/site/source/pages/gerer/index.tsx +++ b/site/source/pages/gerer/index.tsx @@ -19,6 +19,7 @@ import { FabriqueSocialEntreprise, searchDenominationOrSiren, } from '@/api/fabrique-social' +import { TrackChapter, TrackPage } from '@/components/ATInternetTracking' import { Condition, WhenApplicable, @@ -51,7 +52,6 @@ import { companySituationSelector } from '@/selectors/simulationSelectors' import { useSitePaths } from '@/sitePaths' import { evaluateQuestion } from '@/utils' -import { TrackChapter, TrackPage } from '../../ATInternetTracking' import { SimulateurCard } from '../Simulateurs/Home' import { AnnuaireEntreprises } from './components/AnnuaireEntreprises' import { AutoEntrepreneurCard } from './components/AutoEntrepeneurCard' diff --git a/site/source/pages/gerer/sécurité-sociale.tsx b/site/source/pages/gerer/sécurité-sociale.tsx index 2e3ffb51d..d705264bc 100644 --- a/site/source/pages/gerer/sécurité-sociale.tsx +++ b/site/source/pages/gerer/sécurité-sociale.tsx @@ -1,13 +1,13 @@ import { Trans, useTranslation } from 'react-i18next' import styled from 'styled-components' +import { TrackPage } from '@/components/ATInternetTracking' import FoldingMessage from '@/components/ui/FoldingMessage' import { FromBottom } from '@/components/ui/animate' import DefaultHelmet from '@/components/utils/DefaultHelmet' import { H1, H2 } from '@/design-system/typography/heading' import { Body } from '@/design-system/typography/paragraphs' -import { TrackPage } from '../../ATInternetTracking' import Video from './components/Video' export default function SocialSecurity() { diff --git a/site/source/pages/integration/Iframe.tsx b/site/source/pages/integration/Iframe.tsx index 70dea467c..87b0ce594 100644 --- a/site/source/pages/integration/Iframe.tsx +++ b/site/source/pages/integration/Iframe.tsx @@ -5,6 +5,7 @@ import { Trans, useTranslation } from 'react-i18next' import { useHref, useSearchParams } from 'react-router-dom' import styled from 'styled-components' +import { TrackPage } from '@/components/ATInternetTracking' import { PopoverWithTrigger, TextField } from '@/design-system' import { Article } from '@/design-system/card' import { Emoji } from '@/design-system/emoji' @@ -16,7 +17,6 @@ import { Body, Intro } from '@/design-system/typography/paragraphs' import useSimulatorsData, { SimulatorData } from '@/hooks/useSimulatorsData' import urssafLogo from '@/images/Urssaf.svg' -import { TrackPage } from '../../ATInternetTracking' import Meta from '../../components/utils/Meta' import './iframe.css' diff --git a/site/source/pages/integration/index.tsx b/site/source/pages/integration/index.tsx index f469bdd7d..9eec0f721 100644 --- a/site/source/pages/integration/index.tsx +++ b/site/source/pages/integration/index.tsx @@ -1,6 +1,7 @@ import { Trans, useTranslation } from 'react-i18next' import { Route, Routes, useLocation } from 'react-router-dom' +import { TrackChapter } from '@/components/ATInternetTracking' import { ScrollToTop } from '@/components/utils/Scroll' import { Banner, InnerBanner } from '@/design-system/banner' import { Emoji } from '@/design-system/emoji' @@ -8,7 +9,6 @@ import { Link } from '@/design-system/typography/link' import { useFetchData } from '@/hooks/useFetchData' import { useSitePaths } from '@/sitePaths' -import { TrackChapter } from '../../ATInternetTracking' import API from './API' import Iframe from './Iframe' import Library from './Library'