Customer Insights Touchpoint Events
- Applies to:
- MindTouch (current)
- Role required:
- Admin
Events
mindtouch-web-widget:user-activity:ready
Fired when the user activity widget is created. The event data contains the following properties:
Name | Type |
---|---|
embedId | string |
1 | document.addEventListener( 'mindtouch-web-widget:user-activity:ready' , ({ data }) => { |
2 | const embedId = data.embedId; |
3 | }); |
mindtouch-web-widget:user-activity:loaded
Fired when the user activity widget is loaded. The event data contains the following properties:
Name | Type |
---|---|
embedId | string |
widget.userActivityToken | string |
1 | document.addEventListener( 'mindtouch-web-widget:user-activity:loaded' , ({ data }) => { |
2 | const embedId = data.embedId; |
3 | |
4 | // programmable widget interface contains properties and functions |
5 | const widget = data.widget; |
6 | }); |
Properties
embedId
embedId : string
The id of the widget that uniquely identifies it.
userActivityToken
userActivityToken : string
Retrieve or set the token used to search for user activity and performs a search. Set as a JavaScript object property or as a data-user-activity-token
data attribute on the mindtouch/embed
script HTML element.
1 | document.addEventListener( 'mindtouch-web-widget:user-activity:loaded' , ({ data }) => { |
2 | const widget = data.widget; |
3 | widget.userActivityToken = '{example-token}' ; |
4 | const foo = widget.userActivityToken; |
5 | }); |
1 | < script async = "async" src = "https://success.mindtouch.com/@embed/{guid}.js" ></ script > |
2 | < script type = "mindtouch/embed" id = "mindtouch-embed-{guid}" data-user-activity-token = "{example-token}" ></ script > |