bpmn-js-tracking

0.6.0 • Public • Published

bpmn-js-tracking

An extension for bpmn-js to track user interaction.

Installation

Install via npm.

npm install bpmn-js-tracking

Usage

Add as additional module to bpmn-js.

import {
  BpmnJSTracking,
  BpmnJSTrackingModules
 } from 'bpmn-js-tracking';

const bpmnJS = new BpmnJS({
  additionalModules: [
    BpmnJSTracking,
    BpmnJSTrackingModules
  ]
})

const bpmnJsTracking = bpmnJS.get('bpmnJSTracking');

bpmnJsTracking.on('tracking.enabled', function(event) {
  // opt into tracking platform
});

bpmnJsTracking.on('tracking.event', function(event) {
  // send to tracking platform
  // event: { name, data }
});

bpmnJsTracking.on('tracking.disabled', function(event) {
  //  opt out of tracking platform
});

Alternatively, you can import specific tracking modules:

import popupMenuTracking from 'bpmn-js-tracking/lib/features/popup-menu';

Tracked events

Context pad events

Event Name Structure
contextPad.trigger
  • entryId
  • entryGroup
  • entryTitle
  • selection
  • triggerType: ["click", "drag", "keyboard"]

Element templates events

Event Name Structure
elementTemplates.select
  • element
elementTemplates.update
  • element
  • newTemplate
elementTemplates.remove
  • element
elementTemplates.unlink
  • element

Modeling events

Event Name Structure
modeling.appendElement
  • element
  • sourceElement
modeling.createElements
  • elements
modeling.replaceElement
  • oldElement
  • newElement

Palette events

Event Name Structure
palette.trigger
  • entryId
  • entryGroup
  • entryTitle
  • selection
  • triggerType: ["click", "drag", "keyboard"]

Popup menu events

Event Name Structure
popupMenu.open
  • selection
popupMenu.trigger
  • entryId
  • entryGroup
  • entryLabel
  • triggerType: ["click", "drag", "keyboard"]

Selection events

Event Name Structure
selection.select
  • oldSelection
  • newSelection

Readme

Keywords

none

Package Sidebar

Install

npm i bpmn-js-tracking

Weekly Downloads

503

Version

0.6.0

License

MIT

Unpacked Size

17.7 kB

Total Files

23

Last publish

Collaborators

  • vsgoulart
  • skaiir-camunda
  • marstamm
  • bpmn-io-admin
  • nikku
  • barmac
  • philippfromme
  • maxtru