/**
 * GA4 event tracking for Actuate CMS forms.
 *
 * This module pushes structured events to the site's existing gtag() installation.
 * It does NOT load the GA4 script — that's the site owner's responsibility via
 * their Google Analytics snippet or GTM container.
 */
export interface FormAnalyticsConfig {
    enabled: boolean;
    /** GA4 Measurement ID (e.g. "G-XXXXXXXXXX"). If not set, events go to whatever gtag() is configured globally. */
    measurementId?: string;
    /** Custom event name for form submissions. Defaults to "form_submit". */
    submitEventName?: string;
    /** Custom event name for form start (first interaction). Defaults to "form_start". */
    startEventName?: string;
    /** Send as a GA4 conversion event. */
    trackAsConversion?: boolean;
    /** Optional monetary value for conversion tracking (e.g. lead value). */
    conversionValue?: number;
    /** Currency code for conversion value. Defaults to "USD". */
    conversionCurrency?: string;
    /** Additional custom parameters to include with every event. */
    customParameters?: Record<string, string | number | boolean>;
}
export interface FormConfirmation {
    type: 'message' | 'redirect';
    /** Success message shown inline when type is "message". */
    message?: string;
    /** URL to redirect to when type is "redirect". */
    redirectUrl?: string;
    /** Delay in ms before redirecting. Defaults to 0. */
    redirectDelay?: number;
}
declare global {
    interface Window {
        gtag?: (...args: unknown[]) => void;
        dataLayer?: unknown[];
    }
}
/**
 * Track when a user first interacts with a form (focus on first field).
 * Maps to the GA4 recommended "form_start" event.
 */
export declare function trackFormStart(formName: string, formId: string, config?: FormAnalyticsConfig): void;
/**
 * Track a successful form submission.
 * Maps to the GA4 recommended "form_submit" event with optional conversion data.
 */
export declare function trackFormSubmit(formName: string, formId: string, config?: FormAnalyticsConfig, extra?: Record<string, unknown>): void;
/**
 * Track a form submission error.
 */
export declare function trackFormError(formName: string, formId: string, errorMessage: string, config?: FormAnalyticsConfig): void;
/**
 * Push a custom dataLayer event (for GTM users who prefer dataLayer over gtag).
 */
export declare function pushDataLayerEvent(eventName: string, data: Record<string, unknown>): void;
/** Default confirmation config. */
export declare function getDefaultConfirmation(): FormConfirmation;
/** Default analytics config. */
export declare function getDefaultAnalyticsConfig(): FormAnalyticsConfig;
//# sourceMappingURL=analytics.d.ts.map