An extension for [bpmn-js](https://github.com/bpmn-io/bpmn-js) to track user interaction.
npm install bpmn-js-tracking
npm install bpmn-js-tracking
`
Usage
Add as additional module to bpmn-js.
`javascript
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:
`javascript
import popupMenuTracking from 'bpmn-js-tracking/lib/features/popup-menu';
`
Tracked events
$3
| Event Name | Structure |
| :--- | :--- |
| contextPad.trigger| - entryId
- entryGroup
- entryTitle
- selection
- triggerType: ["click", "drag", "keyboard"]
|
$3
| Event Name | Structure |
| :--- | :--- |
| elementTemplates.select| - element
|
| elementTemplates.update| - element
- newTemplate
|
| elementTemplates.remove| - element
|
| elementTemplates.unlink| - element
|
$3
| Event Name | Structure |
| :--- | :--- |
| modeling.appendElement| - element
- sourceElement
|
| modeling.createElements| - elements
|
| modeling.replaceElement| - oldElement
- newElement
|
$3
| Event Name | Structure |
| :--- | :--- |
| palette.trigger| - entryId
- entryGroup
- entryTitle
- selection
- triggerType: ["click", "drag", "keyboard"]
|
$3
| Event Name | Structure |
| :--- | :--- |
| popupMenu.open| - selection
|
| popupMenu.trigger| - entryId
- entryGroup
- entryLabel
- triggerType: ["click", "drag", "keyboard"]
|
$3
| Event Name | Structure |
| :--- | :--- |
| selection.select`|