FE - Dispatch Snowplow events from their event definitions
Add a .definition
method to Tracking
, with the following signature:
/**
* @param {...any} eventData
* @returns {undefined|Boolean}
*/
static definition(...eventData)
After preloading the to-be-used definitions. This method will:
- Find the definition by the provided filename.
- Set
category
andaction
from the definition. Overwritable by the method parameters. - Pass this as parameters for the
.event
method (which implements a queue).