mirror of
https://github.com/arthur-pbty/reducelink.git
synced 2026-06-03 15:07:36 +02:00
feat: ajouter le support de Matomo pour le suivi des pages et améliorer les métadonnées SEO
This commit is contained in:
+38
-90
@@ -1,5 +1,6 @@
|
||||
import type { Metadata, Viewport } from "next";
|
||||
import { Inter } from "next/font/google";
|
||||
import Script from "next/script";
|
||||
import "./globals.css";
|
||||
import Header from "@/components/Header";
|
||||
import Footer from "@/components/Footer";
|
||||
@@ -10,7 +11,8 @@ const inter = Inter({
|
||||
display: "swap",
|
||||
});
|
||||
|
||||
const baseUrl = process.env.NEXT_PUBLIC_BASE_URL || "https://reducelink.arthurp.fr";
|
||||
const baseUrl =
|
||||
process.env.NEXT_PUBLIC_BASE_URL || "https://reducelink.arthurp.fr";
|
||||
|
||||
export const viewport: Viewport = {
|
||||
themeColor: "#2563eb",
|
||||
@@ -25,35 +27,22 @@ export const metadata: Metadata = {
|
||||
template: "%s | ReduceLink",
|
||||
},
|
||||
description:
|
||||
"Raccourcissez vos liens gratuitement avec ReduceLink. Simple, rapide et sans inscription. Créez des liens courts personnalisés avec QR Code, statistiques de clics et alias mémorables.",
|
||||
"Raccourcissez vos liens gratuitement avec ReduceLink. Simple, rapide et sans inscription.",
|
||||
keywords: [
|
||||
"raccourcisseur de liens",
|
||||
"raccourcir url",
|
||||
"shortener",
|
||||
"url shortener",
|
||||
"liens courts",
|
||||
"réduire lien",
|
||||
"QR code",
|
||||
"gratuit",
|
||||
"sans inscription",
|
||||
"raccourcisseur gratuit",
|
||||
"lien court gratuit",
|
||||
"générateur QR code",
|
||||
"statistiques liens",
|
||||
"short link",
|
||||
"reducelink",
|
||||
],
|
||||
authors: [{ name: "ReduceLink", url: baseUrl }],
|
||||
creator: "ReduceLink",
|
||||
publisher: "ReduceLink",
|
||||
applicationName: "ReduceLink",
|
||||
generator: "Next.js",
|
||||
referrer: "origin-when-cross-origin",
|
||||
formatDetection: {
|
||||
email: false,
|
||||
address: false,
|
||||
telephone: false,
|
||||
},
|
||||
alternates: {
|
||||
canonical: "/",
|
||||
},
|
||||
@@ -64,108 +53,67 @@ export const metadata: Metadata = {
|
||||
siteName: "ReduceLink",
|
||||
title: "ReduceLink - Raccourcisseur de liens gratuit",
|
||||
description:
|
||||
"Raccourcissez vos liens gratuitement. Simple, rapide, sans inscription. QR Code et statistiques inclus.",
|
||||
"Raccourcissez vos liens gratuitement. Simple, rapide, sans inscription.",
|
||||
},
|
||||
twitter: {
|
||||
card: "summary_large_image",
|
||||
title: "ReduceLink - Raccourcisseur de liens gratuit",
|
||||
description:
|
||||
"Raccourcissez vos liens gratuitement. Simple, rapide, sans inscription. QR Code et statistiques inclus.",
|
||||
creator: "@reducelink",
|
||||
"Raccourcissez vos liens gratuitement. Simple, rapide, sans inscription.",
|
||||
},
|
||||
robots: {
|
||||
index: true,
|
||||
follow: true,
|
||||
googleBot: {
|
||||
index: true,
|
||||
follow: true,
|
||||
"max-video-preview": -1,
|
||||
"max-image-preview": "large",
|
||||
"max-snippet": -1,
|
||||
},
|
||||
},
|
||||
category: "technology",
|
||||
classification: "URL Shortener",
|
||||
other: {
|
||||
"google-site-verification": "",
|
||||
"msvalidate.01": "",
|
||||
},
|
||||
};
|
||||
|
||||
// JSON-LD structured data for the website
|
||||
const jsonLd = {
|
||||
"@context": "https://schema.org",
|
||||
"@graph": [
|
||||
{
|
||||
"@type": "WebSite",
|
||||
"@id": `${baseUrl}/#website`,
|
||||
url: baseUrl,
|
||||
name: "ReduceLink",
|
||||
description:
|
||||
"Raccourcissez vos liens gratuitement avec ReduceLink. Simple, rapide et sans inscription.",
|
||||
inLanguage: "fr-FR",
|
||||
potentialAction: {
|
||||
"@type": "SearchAction",
|
||||
target: {
|
||||
"@type": "EntryPoint",
|
||||
urlTemplate: `${baseUrl}/liens?search={search_term_string}`,
|
||||
},
|
||||
"query-input": "required name=search_term_string",
|
||||
},
|
||||
},
|
||||
{
|
||||
"@type": "Organization",
|
||||
"@id": `${baseUrl}/#organization`,
|
||||
name: "ReduceLink",
|
||||
url: baseUrl,
|
||||
logo: {
|
||||
"@type": "ImageObject",
|
||||
url: `${baseUrl}/icon-512.png`,
|
||||
},
|
||||
sameAs: [],
|
||||
},
|
||||
{
|
||||
"@type": "WebApplication",
|
||||
"@id": `${baseUrl}/#webapp`,
|
||||
name: "ReduceLink",
|
||||
url: baseUrl,
|
||||
applicationCategory: "UtilitiesApplication",
|
||||
operatingSystem: "All",
|
||||
offers: {
|
||||
"@type": "Offer",
|
||||
price: "0",
|
||||
priceCurrency: "EUR",
|
||||
},
|
||||
description:
|
||||
"Service gratuit de raccourcissement de liens avec QR Code et statistiques de clics.",
|
||||
inLanguage: "fr-FR",
|
||||
featureList: [
|
||||
"Raccourcissement de liens",
|
||||
"Génération de QR Code",
|
||||
"Statistiques de clics",
|
||||
"Alias personnalisés",
|
||||
"Sans inscription",
|
||||
"100% gratuit",
|
||||
],
|
||||
},
|
||||
],
|
||||
"@type": "WebSite",
|
||||
url: baseUrl,
|
||||
name: "ReduceLink",
|
||||
};
|
||||
|
||||
export default function RootLayout({
|
||||
children,
|
||||
}: Readonly<{
|
||||
}: {
|
||||
children: React.ReactNode;
|
||||
}>) {
|
||||
}) {
|
||||
return (
|
||||
<html lang="fr" dir="ltr">
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<link rel="manifest" href="/manifest.json" />
|
||||
<link rel="dns-prefetch" href="https://www.google.com" />
|
||||
|
||||
{/* SEO JSON-LD */}
|
||||
<script
|
||||
type="application/ld+json"
|
||||
dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLd) }}
|
||||
/>
|
||||
|
||||
{/* Matomo propre (siteId 3) */}
|
||||
<Script id="matomo" strategy="afterInteractive">
|
||||
{`
|
||||
var _paq = window._paq = window._paq || [];
|
||||
|
||||
// Privacy (no cookies)
|
||||
_paq.push(['disableCookies']);
|
||||
_paq.push(['setDoNotTrack', true]);
|
||||
|
||||
_paq.push(['trackPageView']);
|
||||
_paq.push(['enableLinkTracking']);
|
||||
|
||||
(function() {
|
||||
var u="https://analytics.arthurp.fr/";
|
||||
_paq.push(['setTrackerUrl', u+'matomo.php']);
|
||||
_paq.push(['setSiteId', '3']);
|
||||
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
|
||||
g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
|
||||
})();
|
||||
`}
|
||||
</Script>
|
||||
</head>
|
||||
|
||||
<body className={`${inter.variable} font-sans antialiased bg-gray-50 text-gray-900 min-h-screen flex flex-col`}>
|
||||
<Header />
|
||||
<main className="flex-1">{children}</main>
|
||||
@@ -173,4 +121,4 @@ export default function RootLayout({
|
||||
</body>
|
||||
</html>
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user