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
Methods
Track(TrackEvent, CancellationToken)
Sends an event.
Task Track(TrackEvent trackEvent, CancellationToken cancellationToken)
Parameters
trackEventTrackEventThe event.
cancellationTokenCancellationTokenThe 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
trackEventsIEnumerable<TrackEvent>The events.
cancellationTokenCancellationTokenThe token to monitor for cancellation requests.
Returns
- Task
A task that represents the asynchronous operation.