bpmn-js-tracking
v0.6.0
Published
An extension for [bpmn-js](https://github.com/bpmn-io/bpmn-js) to track user interaction.
Downloads
3,091
Maintainers
Keywords
Readme
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
| entryIdentryGroupentryTitleselectiontriggerType: ["click", "drag", "keyboard"]|
Element templates events
| Event Name | Structure |
| :--- | :--- |
| elementTemplates.select
| element|
| elementTemplates.update
| elementnewTemplate|
| elementTemplates.remove
| element|
| elementTemplates.unlink
| element|
Modeling events
| Event Name | Structure |
| :--- | :--- |
| modeling.appendElement
| elementsourceElement|
| modeling.createElements
| elements|
| modeling.replaceElement
| oldElementnewElement|
Palette events
| Event Name | Structure |
| :--- | :--- |
| palette.trigger
| entryIdentryGroupentryTitleselectiontriggerType: ["click", "drag", "keyboard"]|
Popup menu events
| Event Name | Structure |
| :--- | :--- |
| popupMenu.open
| selection|
| popupMenu.trigger
| entryIdentryGroupentryLabeltriggerType: ["click", "drag", "keyboard"]|
Selection events
| Event Name | Structure |
| :--- | :--- |
| selection.select
| oldSelectionnewSelection|