Skip to content

Commit

Permalink
Merge pull request #348 from ocruze/feat/links-id-for-analytics
Browse files Browse the repository at this point in the history
feat: add id on anchor tags for analytics
  • Loading branch information
garronej authored Dec 16, 2024
2 parents f0fc0a2 + 38ba640 commit 9ab632d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,7 @@ export const Footer = memo(
target="_blank"
href={`https://${domain}`}
title={`${domain} - ${t("open new window")}`}
id={`footer-${domain.replace(/\./g, "-")}-link`}
>
{domain}
</a>
Expand Down Expand Up @@ -558,6 +559,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
</a>
Expand Down
2 changes: 2 additions & 0 deletions src/SkipLinks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export type SkipLinksProps = {
links: {
label: string;
anchor: string;
id?: string;
}[];
classes?: Partial<Record<"root" | "list" | "link", string>>;
style?: CSSProperties;
Expand Down Expand Up @@ -46,6 +47,7 @@ export const SkipLinks = memo(
<a
className={cx(fr.cx("fr-link"), classes.link)}
href={link.anchor}
id={link.id}
>
{link.label}
</a>
Expand Down

0 comments on commit 9ab632d

Please sign in to comment.