/** * User journey and funnel tracking */ export interface JourneyEvent { type: 'pageview' | 'click' | 'custom'; name: string; url: string; timestamp: string; properties?: Record; } export interface Journey { events: JourneyEvent[]; startTime: string; lastUpdate: string; } /** * User Journey Tracker - tracks the complete path a user takes through your app */ export declare class JourneyTracker { private journey; constructor(); /** * Load journey from storage */ private loadJourney; /** * Save journey to storage */ private saveJourney; /** * Add event to journey */ addEvent(event: JourneyEvent): void; /** * Get current journey */ getJourney(): Journey; /** * Get journey summary */ getSummary(): { totalEvents: number; pageviews: number; clicks: number; customEvents: number; pagesVisited: number; uniquePages: string[]; durationMinutes: number; startTime: string; lastUpdate: string; }; /** * Get recent events */ getRecentEvents(limit?: number): JourneyEvent[]; /** * Clear journey */ clear(): void; } /** * Funnel Tracker - track user progress through defined funnels */ export declare class FunnelTracker { private funnels; private completedSteps; defineFunnel(funnel: FunnelDefinition): void; /** * Track funnel step completion */ trackStep(funnelName: string, stepName: string, properties?: Record): FunnelStepResult | null; /** * Get funnel progress */ getFunnelProgress(funnelName: string): FunnelProgress | null; /** * Reset funnel progress */ resetFunnel(funnelName: string): void; /** * Get all funnels status */ getAllFunnels(): FunnelProgress[]; } export interface FunnelDefinition { name: string; steps: FunnelStep[]; } export interface FunnelStep { name: string; description?: string; } export interface FunnelStepResult { funnelName: string; stepName: string; stepIndex: number; progress: number; isComplete: boolean; nextStep: string | null; properties?: Record; } export interface FunnelProgress { funnelName: string; totalSteps: number; completedSteps: number; progress: number; currentStep: string | null; isComplete: boolean; } /** * Attribution Tracker - track where users come from */ export declare class AttributionTracker { /** * Parse UTM parameters from URL */ static getUTMParameters(url?: string): Record; /** * Get referrer source type */ static getReferrerType(referrer: string): string; /** * Get comprehensive attribution data */ static getAttribution(): { utmParams: Record; referrer: string; referrerType: string; landingPage: string; timestamp: string; }; /** * Store first-touch attribution (persists across sessions) */ static storeFirstTouch(): void; /** * Get first-touch attribution */ static getFirstTouch(): any; } //# sourceMappingURL=journey.d.ts.map