From 2fd96459782f3a2cfed36a90a7d54f0e89080860 Mon Sep 17 00:00:00 2001 From: Sergey Krylov Date: Wed, 26 Mar 2025 12:10:42 +0300 Subject: [PATCH] add google analytics --- src/app/layout.tsx | 3 ++- src/components/metrika.tsx | 21 +++++++++++++++++++-- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 6e6b7f9..0fe5078 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -1,7 +1,7 @@ import type { Metadata } from "next"; import { Geist, Geist_Mono } from "next/font/google"; import "./globals.css"; -import YandexMetrika from '@/components/metrika'; +import { YandexMetrika, GoogleAnalytics } from '@/components/metrika'; const geistSans = Geist({ variable: "--font-geist-sans", @@ -39,6 +39,7 @@ export default function RootLayout({ {children} + ); diff --git a/src/components/metrika.tsx b/src/components/metrika.tsx index a752b13..b9de848 100644 --- a/src/components/metrika.tsx +++ b/src/components/metrika.tsx @@ -1,7 +1,7 @@ /* eslint-disable @next/next/no-img-element */ import Script from 'next/script' -const YandexMetrika = ({ id }: { id: string }) => ( +export const YandexMetrika = ({ id }: { id: string }) => ( <>