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<TrackEventItem>, ILogger<TrackEventDispatcher>)

Sends events to Amplitude and Userflow on a background thread

Declaration
public TrackEventDispatcher(IAsyncQueue<TrackEventItem> queue, ILogger<TrackEventDispatcher> logger)
Parameters
Type Name Description
IAsyncQueue<TrackEventItem> 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 long TrackEvent(string trackEventName, params (string argName, object argVal)[] args)
Parameters
Type Name Description
string trackEventName
(string parameter, object argument)[] args

Key-value pairs of additional event properties.

Returns
Type Description
long

TrackUser(string, params (string argName, object argVal)[])

Post identify event for user to background job that sends events to Amplitude

Declaration
public long TrackUser(string userId, params (string argName, object argVal)[] args)
Parameters
Type Name Description
string userId

Cust1234.56

(string parameter, object argument)[] args

user and group properties - cust.xxx gets mapped to xxx on group

Returns
Type Description
long

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