Skip to content

Latest commit

 

History

History
25 lines (17 loc) · 1.6 KB

File metadata and controls

25 lines (17 loc) · 1.6 KB

Home > @snowplow/node-tracker > CorePlugin

CorePlugin interface

Interface which defines Core Plugins

Signature:

interface CorePlugin 

Properties

Property Type Description
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 before the filter method is called and before the trackerCore callback fires (if the filter passes)
contexts? () => SelfDescribingJson[] (Optional) Called when constructing the context for each event Useful for adding additional context to events
filter? (payload: Payload) => boolean (Optional) Called before the payload is sent to the callback to decide whether to send the payload or skip it
logger? (logger: Logger) => void (Optional) Passed a logger instance which can be used to send log information to the active logger