"use client"; import { useEffect } from "react"; declare global { interface Window { ym?: (counterId: number, action: string, goal: string) => void; } } // Фиксирует показ gate-лестницы в Яндекс.Метрике (цель gate_view). export function GateViewTracker() { useEffect(() => { const c = Number(process.env.NEXT_PUBLIC_METRIKA_COUNTER_ID); if (c && typeof window !== "undefined" && typeof window.ym === "function") { window.ym(c, "reachGoal", "gate_view"); } }, []); return null; }