From 38ba640c59c1918fc4adad3da069f77b10567d01 Mon Sep 17 00:00:00 2001 From: Orka Arnest CRUZE Date: Fri, 29 Nov 2024 14:58:46 +0100 Subject: [PATCH] feat: add id on anchor tags for analytics --- src/Footer.tsx | 2 ++ src/SkipLinks.tsx | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/Footer.tsx b/src/Footer.tsx index b145130c2..28d32bb18 100644 --- a/src/Footer.tsx +++ b/src/Footer.tsx @@ -340,6 +340,7 @@ export const Footer = memo( target="_blank" href={`https://${domain}`} title={`${domain} - ${t("open new window")}`} + id={`footer-${domain.replace(/\./g, "-")}-link`} > {domain} @@ -557,6 +558,7 @@ const { useTranslation, addFooterTranslations } = createComponentI18nApi({ href={p.licenseUrl} target="_blank" title="licence etalab-2.0 - ouvre une nouvelle fenĂȘtre" + id="footer-etalab-licence-link" > licence etalab-2.0 diff --git a/src/SkipLinks.tsx b/src/SkipLinks.tsx index ec1ae67d4..ab1b5c818 100644 --- a/src/SkipLinks.tsx +++ b/src/SkipLinks.tsx @@ -13,6 +13,7 @@ export type SkipLinksProps = { links: { label: string; anchor: string; + id?: string; }[]; classes?: Partial>; style?: CSSProperties; @@ -46,6 +47,7 @@ export const SkipLinks = memo( {link.label}