Skip to content

Commit 38ba640

Browse files
committed
feat: add id on anchor tags for analytics
1 parent df2b768 commit 38ba640

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/Footer.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,7 @@ export const Footer = memo(
340340
target="_blank"
341341
href={`https://${domain}`}
342342
title={`${domain} - ${t("open new window")}`}
343+
id={`footer-${domain.replace(/\./g, "-")}-link`}
343344
>
344345
{domain}
345346
</a>
@@ -557,6 +558,7 @@ const { useTranslation, addFooterTranslations } = createComponentI18nApi({
557558
href={p.licenseUrl}
558559
target="_blank"
559560
title="licence etalab-2.0 - ouvre une nouvelle fenêtre"
561+
id="footer-etalab-licence-link"
560562
>
561563
licence etalab-2.0
562564
</a>

src/SkipLinks.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export type SkipLinksProps = {
1313
links: {
1414
label: string;
1515
anchor: string;
16+
id?: string;
1617
}[];
1718
classes?: Partial<Record<"root" | "list" | "link", string>>;
1819
style?: CSSProperties;
@@ -46,6 +47,7 @@ export const SkipLinks = memo(
4647
<a
4748
className={cx(fr.cx("fr-link"), classes.link)}
4849
href={link.anchor}
50+
id={link.id}
4951
>
5052
{link.label}
5153
</a>

0 commit comments

Comments
 (0)