Skip to main content

Types

This section describes various object types that are used by the Uniform tracker.

Callbacks#

DispatchEventHandler#

GetValueForCookie#

  • Parameter 1: string - Cookie type
  • Parameter 2: Visitor
  • Parameter 3: Logger
  • Parameter 4: string - An optional value that is used a prefix on messages written to the logger. This setting helps to identify messages logged.
  • Returns: GetValueForCookieResult|undefined

OnBeforeDispatchDataHandler#

  • Parameter 1: string - The dispatcher type.
  • Parameter 2: any - The data that will be dispatched. The shape of this object depends on the dispatcher.
  • Parameter 3: Logger
  • Returns: any

OnVisitorInitialized#

Types#

ContextReader#

When a page is rendered, tracking instructions may be provided. For example, information about the Sitecore item that represents the page is included so a "page view" activity can be captured.

Tracking instructions are included in a "context" object. The shape of the context object depends on the type of application that is used. For example, the context object for an MVC site is different than the context object for a JSS site.

A context reader is responsible for reading tracking instructions from a specific type of context object. For example, when a JSS site is used, tracking instructions are included in the Sitecore layout service output. Therefore, the context reader when in a JSS site must understand the shape of the layout service.

DecaySettings#

The Uniform tracker is responsible for calculating profile scores. This type represents the settings that determine how profile scores decay over time.

DispatchSettings#

Values that describe how the dispatch process works.

Logger#

Component that can be used to log activity for debugging and diagnostic purposes.

SubscriptionManager#

The Uniform tracker uses subscriptions as a means for managing event handlers. A subscriber is an event handler that is registered for a specific event. The tracker itself has a subscription manager assigned. In addition, other objects have their own subscription managers.

Properties#

id#

Value that identifies the subscription manager. Since multiple subscription managers may be defined, this value is used to distinguish one from another.

  • Type: string

Functions#

subscribe#

Adds a subscriber for a specific event type to the manager.

  • Parameter 1: string
  • Parameter 2: UniformCallback
  • Returns: UniformUnsubscribe
publish#

Publishes an event to the subscribers for the event type.

  • Parameter 1: UniformEvent
  • Returns: void
getSubscribers#

Gets an array of the subscribers for a specific event type.

  • Parameter 1: string
  • Returns: UniformCallback[]
getSubscriptionTypes#

Gets an array of the event types that have at least one subscriber registered.

  • Returns: string[]

TrackedActivityResults#

Details of the activity that was tracked by the Uniform tracker. This type represents the data that was made available to the dispatch process.

TrackerCookieSettings#

Cookies are used to store visitor context. Some visitor context is associated with the visitor (i.e. is persists across visits) and some visitor context is associated with a specific visit (i.e. each visit has its own value). This type identifies which cookies are visitor cookies and which are visit cookies.

TrackingEvent#

Data used during the tracking process.