/**
 * Web Analytics Tracker
 *
 * Lightweight page-view analytics tracker for Sylphx Platform SDK.
 * Automatically tracks page views, bounce rate, and session data.
 *
 * @example
 * ```typescript
 * import { SDK_API_PATH } from "../../constants";
import { WebAnalyticsTracker } from '@sylphx/platform-sdk/web-analytics'
 *
 * const tracker = new WebAnalyticsTracker()
 * tracker.init({
 *   appKey: 'app_prod_xxx',
 *   endpoint: 'https://your-app.com',
 * })
 * ```
 */
interface WebAnalyticsOptions {
    /** App key for authentication */
    appKey: string;
    /** Base endpoint URL (without trailing slash) */
    endpoint: string;
    /** Auto-track page views (default: true) */
    trackPageViews?: boolean;
    /** Track bounce rate (sessions with only 1 page view) (default: true) */
    trackBounce?: boolean;
    /** SPA hash routing mode (tracks hash changes) (default: false) */
    hashMode?: boolean;
    /** Debug logging (default: false) */
    debug?: boolean;
}
interface PageViewPayload {
    /** URL path (e.g. /about) */
    path: string;
    /** Document referrer */
    referrer: string;
    /** Navigator user agent */
    userAgent: string;
    /** Screen width in pixels */
    screenWidth: number;
    /** Session ID (UUID stored in sessionStorage) */
    sessionId: string;
    /** Unix timestamp (ms) */
    timestamp: number;
}
interface IdentifyPayload {
    /** User ID */
    userId: string;
    /** User traits/properties */
    traits?: Record<string, unknown>;
    /** Session ID */
    sessionId: string;
}
declare class WebAnalyticsTracker {
    private options;
    private initialized;
    private lastPath;
    private pageViewCount;
    private cleanupFns;
    /**
     * Initialize the tracker and start auto-tracking page views
     */
    init(options: WebAnalyticsOptions): void;
    /**
     * Manually track a page view
     */
    trackPageView(path?: string): void;
    /**
     * Identify a user
     */
    identify(userId: string, traits?: Record<string, unknown>): void;
    /**
     * Destroy the tracker and remove event listeners
     */
    destroy(): void;
    private _send;
    private _hookHistoryApi;
    private _hookNextRouter;
}
/**
 * Get or create the global WebAnalyticsTracker singleton
 */
declare function getWebAnalyticsTracker(): WebAnalyticsTracker;
/**
 * Initialize global web analytics tracker
 */
declare function initWebAnalytics(options: WebAnalyticsOptions): void;

export { type IdentifyPayload, type PageViewPayload, type WebAnalyticsOptions, WebAnalyticsTracker, getWebAnalyticsTracker, initWebAnalytics };
