Search Results for

    Show / Hide Table of Contents
    View Source

    Class MetricsConsentService

    Service for managing telemetry consent levels for Umbraco analytics.

    Inheritance
    object
    Namespace: Umbraco.Cms.Core.Services
    Assembly: Umbraco.Core.dll
    Syntax
    public class MetricsConsentService : IMetricsConsentService

    Constructors

    View Source

    MetricsConsentService(IKeyValueService, ILogger<MetricsConsentService>, IBackOfficeSecurityAccessor, IUserService)

    Initializes a new instance of the MetricsConsentService class.

    Declaration
    public MetricsConsentService(IKeyValueService keyValueService, ILogger<MetricsConsentService> logger, IBackOfficeSecurityAccessor backOfficeSecurityAccessor, IUserService userService)
    Parameters
    Type Name Description
    IKeyValueService keyValueService

    The key-value service for storing consent settings.

    ILogger<MetricsConsentService> logger

    The logger.

    IBackOfficeSecurityAccessor backOfficeSecurityAccessor

    The back office security accessor.

    IUserService userService

    The user service.

    Methods

    View Source

    GetConsentLevel()

    Gets the current telemetry consent level.

    Declaration
    public TelemetryLevel GetConsentLevel()
    Returns
    Type Description
    TelemetryLevel

    The current TelemetryLevel configured for the system.

    View Source

    SetConsentLevelAsync(TelemetryLevel)

    Sets the telemetry consent level asynchronously.

    Declaration
    public Task SetConsentLevelAsync(TelemetryLevel telemetryLevel)
    Parameters
    Type Name Description
    TelemetryLevel telemetryLevel

    The TelemetryLevel to set.

    Returns
    Type Description
    Task

    A task representing the asynchronous operation.

    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX