Show / Hide Table of Contents

Class TrackEventDispatcher

Sends events to Amplitude and Userflow on a background thread

Inheritance
object
TrackEventDispatcher
Implements
ITrackEventDispatcher
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: SuperOffice.Util
Assembly: SoDataBase.dll
Syntax
public class TrackEventDispatcher : ITrackEventDispatcher

Constructors

TrackEventDispatcher(IAsyncQueue<TrackEvent>, ILogger<TrackEventDispatcher>)

Sends events to Amplitude and Userflow 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, params (string argName, object argVal)[])

Posts event to background job that sends events to Amplitude and/or Userflow

Declaration
public void TrackEvent(string trackEvent, params (string argName, object argVal)[] args)
Parameters
Type Name Description
string trackEvent

"sale-completed" or "sale-sold" etc

(string parameter, object argument)[] args

WaitForTrackersToCompleteAsync(CancellationToken)

Sends events to Amplitude and Userflow on a background thread

Declaration
public Task WaitForTrackersToCompleteAsync(CancellationToken cancellationToken = default)
Parameters
Type Name Description
CancellationToken cancellationToken
Returns
Type Description
Task

Implements

ITrackEventDispatcher

Extension Methods

EnumUtil.MapEnums<From, To>(From)
Converters.MapEnums<From, To>(From)
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top