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:
@@ -1,10 +1,8 @@
|
||||
import type { Metadata } from 'next'
|
||||
import Link from 'next/link'
|
||||
'use client'
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: 'Fittimo – Bewegung im Alltag | HyggeCraftery',
|
||||
description: 'Sanfte Bewegung und Atemübungen für Körper und Geist im Einklang.',
|
||||
}
|
||||
import Link from 'next/link'
|
||||
import { useEffect } from 'react'
|
||||
import { posthog } from '@/lib/posthog'
|
||||
|
||||
const accent = '#7DAF8A'
|
||||
|
||||
@@ -16,6 +14,10 @@ const features = [
|
||||
]
|
||||
|
||||
export default function FittimoPage() {
|
||||
useEffect(() => {
|
||||
posthog.capture('app_detail_viewed', { app: 'fittimo' })
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<div style={{ fontFamily: 'var(--font-mulish, Mulish, sans-serif)', color: '#3D2B1F', background: '#FAFAF7', overflow: 'hidden' }}>
|
||||
|
||||
@@ -98,7 +100,11 @@ export default function FittimoPage() {
|
||||
<p style={{ fontSize: 16, color: 'rgba(250,250,247,0.65)', margin: '0 0 40px', lineHeight: 1.7 }}>
|
||||
Fittimo 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: 'fittimo' })}
|
||||
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>
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
import type { Metadata } from 'next'
|
||||
import Link from 'next/link'
|
||||
'use client'
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: 'Apps – HyggeCraftery',
|
||||
description: 'Drei sanfte Apps für einen langsameren, bewussteren Alltag.',
|
||||
}
|
||||
import Link from 'next/link'
|
||||
import { posthog } from '@/lib/posthog'
|
||||
|
||||
const apps = [
|
||||
{
|
||||
@@ -56,6 +53,7 @@ export default function AppsPage() {
|
||||
<Link
|
||||
key={app.name}
|
||||
href={app.href}
|
||||
onClick={() => posthog.capture('app_card_clicked', { app_name: app.name })}
|
||||
style={{
|
||||
textDecoration: 'none',
|
||||
display: 'grid',
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
import type { Metadata } from 'next'
|
||||
import Link from 'next/link'
|
||||
'use client'
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: 'Rezeptimo – Kochen mit Freude | HyggeCraftery',
|
||||
description: 'Saisonale Rezepte zum langsamen Kochen — ehrlich, einfach, nährend.',
|
||||
}
|
||||
import Link from 'next/link'
|
||||
import { useEffect } from 'react'
|
||||
import { posthog } from '@/lib/posthog'
|
||||
|
||||
const accent = '#C4896A'
|
||||
|
||||
@@ -16,6 +14,10 @@ const features = [
|
||||
]
|
||||
|
||||
export default function RezeptimoPage() {
|
||||
useEffect(() => {
|
||||
posthog.capture('app_detail_viewed', { app: 'rezeptimo' })
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<div style={{ fontFamily: 'var(--font-mulish, Mulish, sans-serif)', color: '#3D2B1F', background: '#FAFAF7', overflow: 'hidden' }}>
|
||||
|
||||
@@ -98,7 +100,11 @@ export default function RezeptimoPage() {
|
||||
<p style={{ fontSize: 16, color: 'rgba(250,250,247,0.65)', margin: '0 0 40px', lineHeight: 1.7 }}>
|
||||
Rezeptimo 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: 'rezeptimo' })}
|
||||
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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user