This page demonstrates how to use analytics tracking with PostHog, Heap, and Google Analytics. Use the controls below to test different tracking features.
Check the browser console to see tracking events being sent to analytics platforms
import { trackEvent, identifyUser, trackPageView } from '@/lib/analytics'trackEvent({ name: 'button_click', properties: { buttonId: 'submit' } })identifyUser({ userId: 'user-123', userProperties: { plan: 'premium' } })trackPageView('Page Name', { referrer: document.referrer })isFeatureEnabled('my-feature-flag')startSessionRecording() / stopSessionRecording()