diff --git a/public/yandex_701e19522bb44c01.html b/public/yandex_701e19522bb44c01.html
new file mode 100644
index 0000000..7af466a
--- /dev/null
+++ b/public/yandex_701e19522bb44c01.html
@@ -0,0 +1,6 @@
+
+
+
+
+ Verification: 701e19522bb44c01
+
\ No newline at end of file
diff --git a/src/app/[lang]/layout.tsx b/src/app/[lang]/layout.tsx
index 6dcb212..0384e74 100644
--- a/src/app/[lang]/layout.tsx
+++ b/src/app/[lang]/layout.tsx
@@ -6,7 +6,6 @@ import { CookieConsent } from "@/widgets/cookie-consent";
import { Cursor } from "@/widgets/cursor";
import { Preloader } from "@/widgets/preloader";
import { ScrollCounter } from "@/widgets/scroll-counter";
-import { YandexMetrika } from "@/widgets/yandex-metrika";
export function generateStaticParams() {
return [{ lang: "ru" }, { lang: "en" }];
@@ -80,7 +79,6 @@ export default async function LocaleLayout({
{children}
-
);
}
diff --git a/src/app/layout.tsx b/src/app/layout.tsx
index 426c531..7865308 100644
--- a/src/app/layout.tsx
+++ b/src/app/layout.tsx
@@ -144,6 +144,33 @@ export default function RootLayout({ children }: { children: ReactNode }) {
type="application/ld+json"
dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLd) }}
/>
+
+ {/* Yandex.Metrika counter */}
+
+
+ {/* /Yandex.Metrika counter */}
{children}
diff --git a/src/shared/config/i18n/dictionaries.ts b/src/shared/config/i18n/dictionaries.ts
index 1b4fab7..b2c6f1c 100644
--- a/src/shared/config/i18n/dictionaries.ts
+++ b/src/shared/config/i18n/dictionaries.ts
@@ -140,7 +140,7 @@ export const dictionaries: Record = {
},
cookieConsent: {
title: "Мы используем файлы cookie",
- text: "Этот сайт использует файлы cookie и сервис веб-аналитики для сбора обезличенных данных и улучшения работы.",
+ text: "Этот сайт использует файлы cookie для улучшения взаимодействия и корректной работы интерфейса.",
acceptButton: "Понятно",
},
preloader: {
diff --git a/src/widgets/yandex-metrika/index.ts b/src/widgets/yandex-metrika/index.ts
deleted file mode 100644
index d8249a6..0000000
--- a/src/widgets/yandex-metrika/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export { default as YandexMetrika } from "./ui/YandexMetrika";
diff --git a/src/widgets/yandex-metrika/ui/YandexMetrika.tsx b/src/widgets/yandex-metrika/ui/YandexMetrika.tsx
deleted file mode 100644
index 537b4bc..0000000
--- a/src/widgets/yandex-metrika/ui/YandexMetrika.tsx
+++ /dev/null
@@ -1,87 +0,0 @@
-"use client";
-
-import { useEffect, useRef, useState } from "react";
-import { usePathname } from "next/navigation";
-import Script from "next/script";
-
-import {
- COOKIE_CONSENT_EVENT,
- COOKIE_CONSENT_KEY,
-} from "@/widgets/cookie-consent";
-
-declare global {
- interface Window {
- ym?: (
- counterId: number,
- action: "init" | "hit",
- options?: Record | string
- ) => void;
- }
-}
-
-const counterId =
- Number(process.env.NEXT_PUBLIC_YANDEX_METRIKA_ID) || 111930174;
-
-const YandexMetrika = () => {
- const pathname = usePathname();
- const [accepted, setAccepted] = useState(false);
- const previousUrl = useRef(null);
-
- useEffect(() => {
- const timer = window.setTimeout(() => {
- setAccepted(window.localStorage.getItem(COOKIE_CONSENT_KEY) === "accepted");
- }, 0);
- const onAccepted = () => setAccepted(true);
-
- window.addEventListener(COOKIE_CONSENT_EVENT, onAccepted);
-
- return () => {
- window.clearTimeout(timer);
- window.removeEventListener(COOKIE_CONSENT_EVENT, onAccepted);
- };
- }, []);
-
- useEffect(() => {
- if (!accepted || !counterId || !window.ym) return;
-
- const url = window.location.href;
-
- if (previousUrl.current === null) {
- previousUrl.current = url;
- return;
- }
-
- if (previousUrl.current === url) return;
-
- previousUrl.current = url;
- window.ym(counterId, "hit", url);
- }, [accepted, pathname]);
-
- if (!accepted || !counterId) return null;
-
- return (
-
- );
-};
-
-export default YandexMetrika;