Table of Contents

Interface ITracker

Namespace
Ga4.Trackers
Assembly
VpnHood.Net.Toolkit.dll

Represents an analytics tracker, which sends events such as Google Analytics 4's.

public interface ITracker

Properties

IsEnabled

Gets or sets a value indicating whether the tracker sends events; off, it drops them.

bool IsEnabled { get; set; }

Property Value

bool

Methods

Track(TrackEvent, CancellationToken)

Sends an event.

Task Track(TrackEvent trackEvent, CancellationToken cancellationToken)

Parameters

trackEvent TrackEvent

The event.

cancellationToken CancellationToken

The token to monitor for cancellation requests.

Returns

Task

A task that represents the asynchronous operation.

Track(IEnumerable<TrackEvent>, CancellationToken)

Sends events.

Task Track(IEnumerable<TrackEvent> trackEvents, CancellationToken cancellationToken)

Parameters

trackEvents IEnumerable<TrackEvent>

The events.

cancellationToken CancellationToken

The token to monitor for cancellation requests.

Returns

Task

A task that represents the asynchronous operation.