Integrate Rybbit analytics and enhance user tracking features
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.
This commit is contained in:
bilalgursen
2026-08-02 19:29:42 +03:00
parent cc9686147e
commit 0b92f999bc
22 changed files with 499 additions and 16 deletions

View File

@@ -3,6 +3,7 @@ import { drizzleAdapter } from "better-auth/adapters/drizzle";
import { magicLink } from "better-auth/plugins";
import { appDb, schema } from "./appdb";
import { grantCredits, DENEME_KREDISI } from "./credits";
import { magicLinkEpostasi } from "./eposta";
async function sendMagicLinkEmail(email: string, url: string) {
if (process.env.NODE_ENV !== "production") {
@@ -17,11 +18,15 @@ async function sendMagicLinkEmail(email: string, url: string) {
}
const { Resend } = await import("resend");
const resend = new Resend(process.env.RESEND_API_KEY);
const { subject, html, text } = magicLinkEpostasi(url);
await resend.emails.send({
from: process.env.EMAIL_FROM ?? "KolayTercih <onboarding@resend.dev>",
to: email,
subject: "KolayTercih giriş bağlantın",
html: `<p>Merhaba,</p><p>KolayTercih'e giriş yapmak için <a href="${url}">buraya tıkla</a>. Bağlantı 5 dakika geçerlidir.</p><p>Bu isteği sen yapmadıysan bu e-postayı yok sayabilirsin.</p>`,
subject,
html,
// Düz metin alternatifi spam puanını düşürür ve HTML'i engelleyen
// istemcilerde bağlantının okunabilir kalmasını sağlar.
text,
});
}