All checks were successful
Deploy / deploy (push) Successful in 16m7s
- Added Rybbit analytics configuration in .mcp.json for improved data collection. - Updated layout.tsx to conditionally load the Rybbit analytics script in production. - Enhanced user interaction tracking in various components, including GirisForm, RevizyonKutusu, and SatinAlForm, by logging specific events. - Updated privacy policy page to reflect new data handling practices and added a section on service providers and data transfer. - Improved user navigation and experience by integrating Rybbit's live visitor widget in the site footer.
36 lines
1019 B
TypeScript
36 lines
1019 B
TypeScript
"use client";
|
||
|
||
// Rybbit'e giriş yapan kullanıcıyı bildirir.
|
||
//
|
||
// Neden burada: oturum zaten UserNav'da (sunucu bileşeni, Suspense içinde)
|
||
// çözülüyor. Layout'a authClient.useSession() kullanan global bir bileşen
|
||
// koymak landing'i statik olmaktan çıkarır ve ziyaret başına gereksiz bir
|
||
// auth turu attırırdı — bkz. hero-form.tsx'teki aynı gerekçe.
|
||
|
||
import { useEffect } from "react";
|
||
import { kullaniciTanit, kullaniciTemizle } from "@/lib/analitik";
|
||
|
||
export function RybbitIdentify({
|
||
kullaniciId,
|
||
eposta,
|
||
isim,
|
||
}: {
|
||
/** null = oturum yok; o cihazdaki kimlik temizlenir (çıkış sonrası) */
|
||
kullaniciId: string | null;
|
||
eposta?: string | null;
|
||
isim?: string | null;
|
||
}) {
|
||
useEffect(() => {
|
||
if (!kullaniciId) {
|
||
kullaniciTemizle();
|
||
return;
|
||
}
|
||
const traits: Record<string, string> = {};
|
||
if (eposta) traits.email = eposta;
|
||
if (isim) traits.name = isim;
|
||
kullaniciTanit(kullaniciId, traits);
|
||
}, [kullaniciId, eposta, isim]);
|
||
|
||
return null;
|
||
}
|