docs: add comprehensive Stripe billing guide
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 4s
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 4s
Covers architecture, configuration steps, user flows, API routes, webhooks, pricing, testing with Stripe CLI, production checklist, and troubleshooting.
This commit is contained in:
17
memento-note/lib/analytics/track.ts
Normal file
17
memento-note/lib/analytics/track.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
/**
|
||||
* Analytics choke-point — all product analytics must go through these helpers.
|
||||
* New third-party scripts in app/ must check hasAnalyticsConsent() before loading.
|
||||
*/
|
||||
import { hasAnalyticsConsent } from '@/lib/consent/cookie-consent'
|
||||
|
||||
export type AnalyticsEventProperties = Record<string, string | number | boolean | null | undefined>
|
||||
|
||||
export function trackClientEvent(_event: string, _properties?: AnalyticsEventProperties): void {
|
||||
if (!hasAnalyticsConsent()) return
|
||||
// Future: PostHog/Umami client capture (see saas-deployment-prep.md §D)
|
||||
}
|
||||
|
||||
export function trackServerEvent(_event: string, _properties?: AnalyticsEventProperties): void {
|
||||
if (!hasAnalyticsConsent()) return
|
||||
// Future: server-side analytics capture
|
||||
}
|
||||
Reference in New Issue
Block a user