feat(layout): integrate analytics script and enhance preconnect links
- Added a preconnect link for the analytics service to improve loading performance. - Included a script for analytics tracking, set to load after the interactive phase for better user experience.
This commit is contained in:
1 parent
40fd4cf8a3
commit
0a63c3ada0
1 file changed
+7
@@ -1,5 +1,6 @@
|
|||||||
import type { Metadata } from "next";
|
import type { Metadata } from "next";
|
||||||
import { Geist, Geist_Mono } from "next/font/google";
|
import { Geist, Geist_Mono } from "next/font/google";
|
||||||
|
import Script from "next/script";
|
||||||
import "./globals.css";
|
import "./globals.css";
|
||||||
|
|
||||||
const geistSans = Geist({
|
const geistSans = Geist({
|
||||||
@@ -86,6 +87,7 @@ export default function RootLayout({
|
|||||||
<link rel="preconnect" href="https://wa.me" />
|
<link rel="preconnect" href="https://wa.me" />
|
||||||
<link rel="preconnect" href="https://www.linkedin.com" />
|
<link rel="preconnect" href="https://www.linkedin.com" />
|
||||||
<link rel="preconnect" href="https://github.com" />
|
<link rel="preconnect" href="https://github.com" />
|
||||||
|
<link rel="preconnect" href="https://analytics.evandro.dev.br" />
|
||||||
|
|
||||||
{/* DNS prefetch for additional performance */}
|
{/* DNS prefetch for additional performance */}
|
||||||
<link rel="dns-prefetch" href="//fonts.googleapis.com" />
|
<link rel="dns-prefetch" href="//fonts.googleapis.com" />
|
||||||
@@ -123,6 +125,11 @@ export default function RootLayout({
|
|||||||
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
|
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
|
<Script
|
||||||
|
src="https://analytics.evandro.dev.br/api/script.js"
|
||||||
|
data-site-id="1"
|
||||||
|
strategy="afterInteractive"
|
||||||
|
/>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in new issue
Block a user