@optic7409/resolvo-analytics
Version:
Simplified analytics client library for Next.js with automatic SSR handling, one-line integration, and comprehensive tracking
18 lines (17 loc) • 576 B
TypeScript
import { ResolvoConfig } from '../types';
export interface EnvironmentInfo {
isClient: boolean;
isServer: boolean;
isDevelopment: boolean;
isProduction: boolean;
isTest: boolean;
framework: 'nextjs' | 'react' | 'vue' | 'angular' | 'unknown';
routerType?: 'app' | 'pages';
nextJsVersion?: string;
}
export declare function detectEnvironment(): EnvironmentInfo;
export declare function shouldEnableAnalytics(config: {
debug?: boolean;
environment?: string;
}): boolean;
export declare function getDefaultConfig(): Partial<ResolvoConfig>;