analytics
Installation
SKILL.md
Analytics Skill
This project ships a lightweight trackEvent stub in lib/analytics.ts. Vercel Analytics auto-pageviews are already wired in app/layout.tsx. Custom events are called from services — no code changes needed in routes or components when you swap providers.
Current implementation — lib/analytics.ts
type EventProperties = Record<string, unknown>;
export function trackEvent(event: string, properties?: EventProperties): void {
console.log(
JSON.stringify({ event, properties, timestamp: new Date().toISOString() }),
);
}
Safe to call from server-side code. Currently logs to console — replace the body to send to a real provider.