Documentation
    Preparing search index...

    Interface Analytics

    interface Analytics {
        appName: AUTHENTIC_APP_NAME;
        dynamicConfigs: Record<string, any>;
        featureFlagIsEnabled: (featureFlagName: string) => boolean;
        featureFlags: Record<string, boolean>;
        sessionId: string;
        setGetClientSnapshot: (getClientSnapshot: () => ClientSnapshot) => void;
        trackEvent: (
            eventName: ANALYTICS_EVENT_NAME,
            eventData?: Record<string, any>,
        ) => Promise<void>;
        updateUser: (
            updates: {
                id?: string;
                properties?: {
                    authEmail?: string;
                    businessName?: string | null;
                    email?: string | null;
                    isAuthenticAdmin?: boolean;
                    mailingAddress?: string | null;
                    name?: string | null;
                    organizationChannel?: ORGANIZATION_CHANNEL;
                    organizationId?: string;
                    organizationName?: string;
                    phoneNumber?: string | null;
                    tenantCustomerId?: string | null;
                    tenantId?: string;
                    tenantName?: string;
                };
            },
        ) => Promise<void>;
        urlParams: Record<string, string> | null;
        user: AnalyticsUser;
    }

    Hierarchy

    Index
    dynamicConfigs: Record<string, any>
    featureFlagIsEnabled: (featureFlagName: string) => boolean

    Checks if the feature flag with the given name is enabled.

    Type Declaration

      • (featureFlagName: string): boolean
      • Parameters

        • featureFlagName: string

        Returns boolean

        false if feature flag not found.

    featureFlags: Record<string, boolean>
    sessionId: string
    setGetClientSnapshot: (getClientSnapshot: () => ClientSnapshot) => void
    trackEvent: (
        eventName: ANALYTICS_EVENT_NAME,
        eventData?: Record<string, any>,
    ) => Promise<void>

    Tracks an event with the given name, optionally with a ClientSnapshot from the set callback and/or the given event data, both flattened into top-level camelCase properties.

    updateUser: (
        updates: {
            id?: string;
            properties?: {
                authEmail?: string;
                businessName?: string | null;
                email?: string | null;
                isAuthenticAdmin?: boolean;
                mailingAddress?: string | null;
                name?: string | null;
                organizationChannel?: ORGANIZATION_CHANNEL;
                organizationId?: string;
                organizationName?: string;
                phoneNumber?: string | null;
                tenantCustomerId?: string | null;
                tenantId?: string;
                tenantName?: string;
            };
        },
    ) => Promise<void>

    Updates the AnalyticsUser with the given ID and/or AnalyticsUserProperties.

    urlParams: Record<string, string> | null