Add PostHog analytics — full event tracking across all pages

Tracks pageviews, hero/CTA clicks, product teaser clicks, app card
and detail views, newsletter signups, nav interactions, and footer
link clicks with structured properties for PostHog dashboards.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Tim Leikauf
2026-07-01 20:59:29 +02:00
parent 7f67d123d6
commit 0101447d84
14 changed files with 248 additions and 64 deletions

View File

@@ -1,10 +1,8 @@
import type { Metadata } from 'next'
import Link from 'next/link'
'use client'
export const metadata: Metadata = {
title: 'Snakkimo Sprachen lernen | HyggeCraftery',
description: 'Sprachen lernen, das sich anfühlt wie durch einen schönen Feed scrollen. Kleine Lektionen, großer Effekt.',
}
import Link from 'next/link'
import { useEffect } from 'react'
import { posthog } from '@/lib/posthog'
const accent = '#7BA7BC'
@@ -16,6 +14,10 @@ const features = [
]
export default function SnakkimoPage() {
useEffect(() => {
posthog.capture('app_detail_viewed', { app: 'snakkimo' })
}, [])
return (
<div style={{ fontFamily: 'var(--font-mulish, Mulish, sans-serif)', color: '#3D2B1F', background: '#FAFAF7', overflow: 'hidden' }}>
@@ -98,7 +100,11 @@ export default function SnakkimoPage() {
<p style={{ fontSize: 16, color: 'rgba(250,250,247,0.65)', margin: '0 0 40px', lineHeight: 1.7 }}>
Snakkimo erscheint bald. Trage dich in unseren Newsletter ein und erfahre als Erste davon.
</p>
<Link href="/#newsletter" style={{ textDecoration: 'none', display: 'inline-flex', alignItems: 'center', gap: 10, background: accent, color: '#FAFAF7', fontSize: 15.5, fontWeight: 600, padding: '16px 36px', borderRadius: 44 }}>
<Link
href="/#newsletter"
onClick={() => posthog.capture('newsletter_cta_clicked', { source: 'app_page', app_name: 'snakkimo' })}
style={{ textDecoration: 'none', display: 'inline-flex', alignItems: 'center', gap: 10, background: accent, color: '#FAFAF7', fontSize: 15.5, fontWeight: 600, padding: '16px 36px', borderRadius: 44 }}
>
Benachrichtigen lassen
</Link>
</div>