Skip to main content

node-tracker.coreplugin

Home > @snowplow/node-tracker > CorePlugin

CorePlugin interface

Interface which defines Core Plugins

Signature:
interface CorePlugin 

Properties

PropertyTypeDescription
activateCorePlugin?(core: TrackerCore) => void(Optional) Called when the plugin is initialised during the trackerCore construction
afterTrack?(payload: Payload) => void(Optional) Called just after the trackerCore callback fires
beforeTrack?(payloadBuilder: PayloadBuilder) => void(Optional) Called just before the trackerCore callback fires
contexts?() => SelfDescribingJson[](Optional) Called when constructing the context for each event Useful for adding additional context to events
logger?(logger: Logger) => void(Optional) Passed a logger instance which can be used to send log information to the active logger