Class TrackEventDispatcher
Sends events to Amplitude on a background thread
Implements
Inherited Members
Namespace: SuperOffice.Util
Assembly: SoDataBase.dll
Syntax
public class TrackEventDispatcher : ITrackEventDispatcher
Constructors
TrackEventDispatcher(IAsyncQueue<TrackEvent>, ILogger<TrackEventDispatcher>)
Sends events to Amplitude on a background thread
Declaration
public TrackEventDispatcher(IAsyncQueue<TrackEvent> queue, ILogger<TrackEventDispatcher> logger)
Parameters
Type | Name | Description |
---|---|---|
IAsyncQueue<TrackEvent> | queue | |
ILogger<TrackEventDispatcher> | logger |
Methods
GetInstance()
Returns a tracker instance if the feature is enabled, and we are online
Declaration
public static ITrackEventDispatcher GetInstance()
Returns
Type | Description |
---|---|
ITrackEventDispatcher | NULL if not online |
TrackEvent(string)
Posts event to background job that sends events to Amplitude and/or Userflow
Declaration
public void TrackEvent(string trackEvent)
Parameters
Type | Name | Description |
---|---|---|
string | trackEvent | "sale-completed" or "sale-sold" etc |
WaitForTrackersToCompleteAsync(CancellationToken)
Sends events to Amplitude on a background thread
Declaration
public Task WaitForTrackersToCompleteAsync(CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task |