Skip to content

Commit 469f9c5

Browse files
committed
feat: add matomo tag
1 parent da894ce commit 469f9c5

File tree

1 file changed

+23
-4
lines changed

1 file changed

+23
-4
lines changed

app/layout.jsx

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { Head } from 'nextra/components'
33
import { getPageMap } from 'nextra/page-map'
44
import 'nextra-theme-docs/style.css'
55
import Image from 'next/image';
6+
import Script from 'next/script';
67

78
export const metadata = {
89
title: 'Fastfony Documentation',
@@ -35,10 +36,28 @@ export default async function RootLayout({ children }) {
3536
suppressHydrationWarning
3637
>
3738
<Head
38-
// ... Your additional head options
39-
>
40-
{/* Your additional tags should be passed as `children` of `<Head>` element */}
41-
</Head>
39+
children={
40+
<>
41+
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png"/>
42+
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png"/>
43+
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png"/>
44+
<link rel="manifest" href="/site.webmanifest"/>
45+
<Script id="matomo">
46+
{`var _paq = window._paq = window._paq || [];
47+
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
48+
_paq.push(['trackPageView']);
49+
_paq.push(['enableLinkTracking']);
50+
(function() {
51+
var u="//matomo.8tier.fr/";
52+
_paq.push(['setTrackerUrl', u+'matomo.php']);
53+
_paq.push(['setSiteId', '10']);
54+
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
55+
g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
56+
})();`}
57+
</Script>
58+
</>
59+
}
60+
/>
4261
<body>
4362
<Layout
4463
navbar={navbar}

0 commit comments

Comments
 (0)