List of Whatfix Functions
- 04 Oct 2021
- 16 Minutes To Read
-
Print
-
DarkLight
-
PDF
List of Whatfix Functions
- Updated On 04 Oct 2021
- 16 Minutes To Read
-
Print
-
DarkLight
-
PDF
Whatfix functions enable you to utilize additional functionalities and configurations using code that is added in the Advanced Customization section.
Here is an example function to display a pop-up when the user completes a specific step in a Flow.
function onNext(event)
{
if(event.flow_id == '+' && event.step == '+')
{
var pop1 = document.querySelectorAll('.gwt-PopupPanel')[1];
pop1.parentNode.removeChild(pop1);
}
}
window._wfx_settings = {onNext: onEvent};
Flow Functions
Function | Purpose | Example Code Snippet |
OnStart | Callback after the Flow starts |
|
OnMiss | Callback when Flow step is missed |
|
OnClose | Callback when the Flow is closed |
|
OnEnd | Callback when the Flow is complete |
|
OnFlowFeedback | Callback when the Flow feedback is submitted |
|
onBeforeEnd | Callback before the Flow ends |
|
onBeforeShow | Callback before the step is shown |
|
onAfterShow | Callback after the step is shown |
|
onBeforeStart | Callback before the Flow starts |
|
onNext | Callback on click of next button |
|
Self Help Functions
Function | Purpose | Example Code Snippet |
onWidgetClick | Callback when the user clicks on the Self Help and opens it |
|
OnSelfHelpClose | Callback when the Self Help widget is closed |
|
OnSelfHelpShow | Callback when the Self Help widget appears on the user screen. |
|
OnSelfhelpSearch | Callback when user searches in Self Help |
|
OnGroupOpen | Callback when user opens a group |
|
OnGroupClose | Callback when user closes a group |
|
OnSearchCross | Callback when the cross icon in the search field is clicked |
|
OnSearchScroll | Callback when a user scrolls in Self Help |
|
OnVideoStart | Callback when video content is clicked |
|
OnLinkStart | Callback when link content is clicked |
|
OnTextStart | Callback when text content is opened |
|
OnTextEnd | Callback when text content is closed |
|
Task List Functions
Function | Purpose | Example Code Snippet |
onWidgetClicked | Callback when the Task List widget is clicked |
|
OnWidgetLoaded | Callback when the Task List is opened |
|
OnWidgetScroll | Callback when the tasks in the Task List is scrolled |
|
OnWidgetClose | Callback when the Task List is closed using the close icon |
|
Pop-up Functions
Analytics Callbacks
Function | Purpose | Example Code Snippet |
trackNewPopupShown | Callback when the Pop-up is loaded. |
|
trackNewPopupSkip | Callback when the Pop-up is skipped by the user. |
|
trackNewPopupStartFlow | Callback when clicking the Pop-up leads to another Flow. |
|
trackNewPopupStartUrl | Callback when clicking the Pop-up leads to a link or a URL. |
|
trackNewPopupClose | Callback when the Pop-up is closed. |
|
trackNewPopupDoNotShow | Callback when the user clicks Do Not Show Again option on a Pop-up. |
|
OnEndPopUpCloseFromButton | Callback when the Pop-up (after the Flow) is closed using the CLOSE button. |
|
OnEndPopUpCloseFromCross | Callback when the Pop-up (after the Flow) is closed using the close icon. |
|
OnEndPopUpCloseFromFlowClick | Callback when the close icon in the Flow tip is clicked. |
|
Non-analytics Callbacks
Function | Purpose | Online or Offline? | Example Code Snippet |
---|---|---|---|
onPopupClose | Callback when the Pop-up is closed. | Online |
|
onPopupSuccess | Callback when a Flow or content is triggered from a Pop-up. | Online |
|
onPopupSkip | Callback when the Pop-up is skipped by the user. | Online |
|
onBeforePopUpShow | Callback before the Pop-up is displayed to the user. | Online |
|
onPopupView | Callback when the Pop-up is viewed by the user. | Offline |
|
onDontShowPopup | Callback when the user clicks Do Not Show option in a Pop-up. | Offline |
|
getPopupViewCount | Callback to get the number of users who viewed the Pop-up. | Offline |
|
Smart Tip Functions
Function | Purpose | Example Code Snippet |
onStaticShow | Callback for each time the Smart Tip is shown |
|
onStaticClose | Callback when the Smart Tip is closed by pressing the cross icon |
|
onStaticMiss | Callback if the step is missed |
|
OnValidationValid | Callback when validation is passed |
|
OnValidationError | Callback when a validation error occurs |
|
OnValidationRectified | Callback when a validation error is rectified |
|
Beacon Functions
Functions | Purpose | Example Code Snippet |
OnBeaconClicked | Callback when a Beacon is clicked |
|
OnBeaconShown | Callback when a Beacon appears on the user screen |
|
OnWidgetLoadedEvent | Callback when a Beacon content is loaded |
|
Was This Article Helpful?