Overview

The Analytics API allows you to retrieve various analytics data from the Wacht platform, including user statistics and recent signups.

fetchAnalyticsStats(options?: AnalyticsStatsOptions)

Retrieves overall analytics statistics.

Parameters

  • options (optional): An object containing filtering options.
    • start_date (string): The start date for the analytics data (e.g., ‘YYYY-MM-DD’).
    • end_date (string): The end date for the analytics data (e.g., ‘YYYY-MM-DD’).
    • organization_id (string): Filter analytics by a specific organization.

Returns

Promise<AnalyticsStats>: A promise that resolves to an object containing various analytics statistics.

fetchRecentSignups(limit?: number)

Retrieves a list of recent user signups.

Parameters

  • limit (number): The maximum number of recent signups to retrieve.

Returns

Promise<RecentSignupsResponse>: A promise that resolves to an object containing a list of recent signups and the total count.