DataWeb
Search Results for

    Show / Hide Table of Contents

    Interface IAnalyticsService

    Service for managing analytics goals.

    Namespace: DataWeb.Analytics
    Assembly: DataWeb.Core.dll
    Syntax
    public interface IAnalyticsService

    Methods

    GetGoalAsync(AnalyticsGoalFilter, CancellationToken)

    Gets an analytics goal matching the specified filter.

    Declaration
    Task<AnalyticsGoal> GetGoalAsync(AnalyticsGoalFilter filter, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    AnalyticsGoalFilter filter

    The AnalyticsGoalFilter to use when querying for the goal.

    CancellationToken cancellationToken

    The cancellation token.

    Returns
    Type Description
    Task<AnalyticsGoal>

    An analytics goal matching the specified filter.

    GetGoalCountAsync(AnalyticsGoalFilter, CancellationToken)

    Gets the count of analytics goals matching the specified filter.

    Declaration
    Task<long> GetGoalCountAsync(AnalyticsGoalFilter filter, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    AnalyticsGoalFilter filter

    The AnalyticsGoalFilter to use when counting goals.

    CancellationToken cancellationToken

    The cancellation token.

    Returns
    Type Description
    Task<long>

    The count of analytics goals matching the specified filter.

    GetGoalTotalValueAsync(AnalyticsGoalFilter, CancellationToken)

    Gets the total value of analytics goals matching the specified filter.

    Declaration
    Task<decimal> GetGoalTotalValueAsync(AnalyticsGoalFilter filter, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    AnalyticsGoalFilter filter

    The AnalyticsGoalFilter to use when calculating the total value of goals.

    CancellationToken cancellationToken

    The cancellation token.

    Returns
    Type Description
    Task<decimal>

    The total value of analytics goals matching the specified filter.

    GetGoalsAsync(AnalyticsGoalFilter, CancellationToken)

    Gets a collection of AnalyticsGoal objects that match the specified AnalyticsGoalFilter.

    Declaration
    Task<IEnumerable<AnalyticsGoal>> GetGoalsAsync(AnalyticsGoalFilter filter, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    AnalyticsGoalFilter filter

    The AnalyticsGoalFilter used to search for goals.

    CancellationToken cancellationToken

    The cancellation token.

    Returns
    Type Description
    Task<IEnumerable<AnalyticsGoal>>

    A collection of AnalyticsGoal objects.

    GetPeriodData(string, DateTime?, DateTime?)

    Gets the period data for a given period mode and optional start and end dates.

    Declaration
    PeriodData GetPeriodData(string periodMode, DateTime? periodDateStart = null, DateTime? periodDateEnd = null)
    Parameters
    Type Name Description
    string periodMode

    The period mode as a string (e.g. "Today", "CurrentWeek", "CurrentMonth", etc.).

    DateTime? periodDateStart

    Optional start date for custom period mode.

    DateTime? periodDateEnd

    Optional end date for custom period mode.

    Returns
    Type Description
    PeriodData

    A PeriodData object containing the period data, including start and end dates, aggregation mode, and description.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown when periodMode is null or empty.

    ArgumentException

    Thrown when periodMode is Custom but dates are not provided, periodDateStart > periodDateEnd, or periodMode is unknown.

    GetPeriodModes()

    Gets a list of period modes.

    Declaration
    List<List.ListItem> GetPeriodModes()
    Returns
    Type Description
    List<List.ListItem>

    A list of List.ListItem objects representing the available period modes.

    SetGoalAsync(AnalyticsGoal, CancellationToken)

    Sets an analytics goal.

    Declaration
    Task SetGoalAsync(AnalyticsGoal goal, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    AnalyticsGoal goal

    The AnalyticsGoal to set.

    CancellationToken cancellationToken

    The cancellation token.

    Returns
    Type Description
    Task

    A task representing the asynchronous operation.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown when goal is null.

    In this article
    Back to top Generated by DocFX