---
title: "List of Whatfix functions"
slug: "list-of-whatfix-functions"
updated: 2024-07-19T04:08:08Z
published: 2024-07-19T04:08:08Z
---

> ## Documentation Index
> Fetch the complete documentation index at: https://support.whatfix.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List of Whatfix functions

Whatfix functions enable you to utilize additional functionalities and configurations using code that is added in the **Advanced Customization** section. See [](/studio/docs/access-advanced-customization)[Advanced Customization](/studio/docs/advanced-configuration).

Here is an example function to display a pop-up when the user completes a specific step in a Flow.

```javascript
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 | ```javascript function OnStart(event){ track(event.path, event.flow_id, event.flow_title, event.ent_id, event.src_id, event.on_id, event.interaction_id, event.user_id, event.step); } function track(var path, var flow_id, var flow_title, var ent_id, var src_id, var on_id, var interaction_id, var step, var content, var user_id){ //Your implementation goes here console.log(path + ", " + flow_id + ", " + flow_title + ", " + ent_id + ", " + src_id + ", " + on_id + ", " + interaction_id + ", " + user_id step + ", " + user_id + ", " + content); } window._wfx_settings.tracker = { trackLiveStart:OnStart }; ``` |
| OnMiss | Callback when Flow step is missed | ```javascript function OnMiss(event) { track(null, event.flow_id, event.flow_title, event.ent_id, event.src_id, event.on_id, event.interaction_id, event.user_id, null, event.content); } function track(var path, var flow_id, var flow_title, var ent_id, var src_id, var on_id, var interaction_id, var step, var content, var user_id){ //Your implementation goes here console.log(path + ", " + flow_id + ", " + flow_title + ", " + ent_id + ", " + src_id + ", " + on_id + ", " + interaction_id + ", " + user_id step + ", " + user_id + ", " + content); } window._wfx_settings.tracker = {trackLiveMiss:OnMiss}; ``` |
| OnClose | Callback when the Flow is closed | ```javascript function OnClose(event) { track(null, event.flow_id, event.flow_title, event.ent_id, event.src_id, event.on_id, event.interaction_id, event.user_id, null, event.content); } function track(var path, var flow_id, var flow_title, var ent_id, var src_id, var on_id, var interaction_id, var step, var content, var user_id){ //Your implementation goes here console.log(path + ", " + flow_id + ", " + flow_title + ", " + ent_id + ", " + src_id + ", " + on_id + ", " + interaction_id + ", " + user_id step + ", " + user_id + ", " + content); } window._wfx_settings.tracker = { trackLiveClose:OnClose }; ``` |
| OnEnd | Callback when the Flow is complete | ```javascript function OnEnd(event) { track(null, event.flow_id, event.flow_title, event.ent_id, event.src_id, event.on_id, event.interaction_id, event.user_id, null, event.content); } function track(var path, var flow_id, var flow_title, var ent_id, var src_id, var on_id, var interaction_id, var step, var content, var user_id){ //Your implementation goes here console.log(path + ", " + flow_id + ", " + flow_title + ", " + ent_id + ", " + src_id + ", " + on_id + ", " + interaction_id + ", " + user_id step + ", " + user_id + ", " + content); } window._wfx_settings.tracker = {trackLiveEnd:OnEnd}; ``` |
| OnFlowFeedback | Callback when the Flow feedback is submitted | ```javascript function OnFlowFeedback(event) { track(null, event.flow_id, event.flow_title, event.ent_id, event.src_id, event.on_id, event.interaction_id, event.user_id, null, event.content); } function track(var path, var flow_id, var flow_title, var ent_id, var src_id, var on_id, var interaction_id, var step, var content, var user_id){ //Your implementation goes here console.log(path + ", " + flow_id + ", " + flow_title + ", " + ent_id + ", " + src_id + ", " + on_id + ", " + interaction_id + ", " + user_id step + ", " + user_id + ", " + content); } window._wfx_settings.tracker = {trackFlowFeedback:OnFlowFeedback}; ``` |
| onBeforeEnd | Callback before the Flow ends | ```javascript function onBeforeEnd(event) { //Your implementation goes here } window._wfx_settings = {onBeforeEnd: onEvent}; ``` |
| onBeforeShow | Callback before the step is shown | ```javascript function onBeforeShow(event) { //Your implementation goes here } window._wfx_settings = {onBeforeShow: onEvent}; ``` |
| onAfterShow | Callback after the step is shown | ```javascript function onAfterShow(event) { //Your implementation goes here } window._wfx_settings = {onAfterShow: onEvent}; ``` |
| onBeforeStart | Callback before the Flow starts | ```javascript function onBeforeStart(event) { //Your implementation goes here } window._wfx_settings = {onBeforeStart: onEvent}; ``` |
| onNext | Callback on click of next button | ```javascript function onNext(event) { //Your implementation goes here } window._wfx_settings = {onNext: onEvent}; ``` |

## 

## Self Help Functions

| **Function** | **Purpose** | **Example Code Snippet** |
| --- | --- | --- |
| onWidgetClick | Callback when the user clicks on the Self Help and opens it | ```javascript function onWidgetClick(event) { track(event.path, event.ent_id, event.src_id, event.on_id, event.interaction_id, event.user_id); //path : '/widget' } function track(var path, var ent_id, var src_id, var on_id, var interaction_id, var user_id){ //Your implementation goes here console.log(path + ", " + ent_id + ", " + src_id + ", " + on_id + "," + ", " + interaction_id + ", " + user_id); } window._wfx_settings.tracker = {trackSelfHelpOpened:onWidgetClick}; ``` |
| <meta charset="utf-8">OnSelfHelpClose | <meta charset="utf-8">Callback when the Self Help widget is closed | ```javascript function OnSelfHelpClose(event) { track(event.path, event.ent_id, event.src_id, event.on_id, event.interaction_id, event.user_id); //path : '/widget' } function track(var path, var ent_id, var src_id, var on_id, var interaction_id, var user_id){ //Your implementation goes here console.log(path + ", " + ent_id + ", " + src_id + ", " + on_id + "," + ", " + interaction_id + ", " + user_id); } window._wfx_settings.tracker = {trackSelfHelpClosed:OnSelfHelpClose}; ``` |
| OnSelfHelpShow | Callback when the Self Help widget appears on the user screen. | ```javascript function OnSelfHelpShow(event) { track(event.path, event.ent_id, event.src_id, event.on_id, event.interaction_id, event.user_id); //path : '/widget' } function track(var path, var ent_id, var src_id, var on_id, var interaction_id, var user_id){ //Your implementation goes here console.log(path + ", " + ent_id + ", " + src_id + ", " + on_id + "," + ", " + interaction_id + ", " + user_id); } window._wfx_settings.tracker = {trackSelfHelpShown:OnSelfHelpShow}; ``` |
| OnSelfhelpSearch | Callback when user searches in Self Help | ```javascript function OnSelfhelpSearch(event) { track(event.path, event.ent_id, event.src_id, event.on_id, event.interaction_id, event.user_id); //path : '/widget' } function track(var path, var ent_id, var src_id, var on_id, var interaction_id, var user_id){ //Your implementation goes here console.log(path + ", " + ent_id + ", " + src_id + ", " + on_id + "," + ", " + interaction_id + ", " + user_id); } window._wfx_settings.tracker = {trackSearch:OnSelfhelpSearch}; ``` |
| OnGroupOpen | Callback when user opens a group | ```javascript function OnGroupOpen(event) { track(event.path, event.ent_id, event.src_id, event.on_id, event.interaction_id, event.user_id); //path : '/widget' } function track(var path, var ent_id, var src_id, var on_id, var interaction_id, var user_id){ //Your implementation goes here console.log(path + ", " + ent_id + ", " + src_id + ", " + on_id + "," + ", " + interaction_id + ", " + user_id); } window._wfx_settings.tracker = {trackGroupOpen:OnGroupOpen}; ``` |
| OnGroupClose | Callback when user closes a group | ```javascript function OnGroupClose(event) { track(event.path, event.ent_id, event.src_id, event.on_id, event.interaction_id, event.user_id); //path : '/widget' } function track(var path, var ent_id, var src_id, var on_id, var interaction_id, var user_id){ //Your implementation goes here console.log(path + ", " + ent_id + ", " + src_id + ", " + on_id + "," + ", " + interaction_id + ", " + user_id); } window._wfx_settings.tracker = {trackGroupClose:OnGroupClose}; ``` |
| OnSearchCross | Callback when the cross icon in the search field is clicked | ```javascript function OnSearchCross(event) { track(event.path, event.ent_id, event.src_id, event.on_id, event.interaction_id, event.user_id); //path : '/widget' } function track(var path, var ent_id, var src_id, var on_id, var interaction_id, var user_id){ //Your implementation goes here console.log(path + ", " + ent_id + ", " + src_id + ", " + on_id + "," + ", " + interaction_id + ", " + user_id); } window._wfx_settings.tracker = {trackSearchCross:OnSearchCross}; ``` |
| OnSearchScroll | Callback when a user scrolls in Self Help | ```javascript function OnSearchScroll(event) { track(event.path, event.ent_id, event.src_id, event.on_id, event.interaction_id, event.user_id); //path : '/widget' } function track(var path, var ent_id, var src_id, var on_id, var interaction_id, var user_id){ //Your implementation goes here console.log(path + ", " + ent_id + ", " + src_id + ", " + on_id + "," + ", " + interaction_id + ", " + user_id); } window._wfx_settings.tracker = {trackSearchScroll:OnSearchScroll}; ``` |
| OnVideoStart | Callback when video content is clicked | ```javascript function OnVideoStart(event) { track(event.path, event.ent_id, event.src_id, event.on_id, event.interaction_id, event.user_id); //path : '/widget' } function track(var path, var ent_id, var src_id, var on_id, var interaction_id, var user_id){ //Your implementation goes here console.log(path + ", " + ent_id + ", " + src_id + ", " + on_id + "," + ", " + interaction_id + ", " + user_id); } window._wfx_settings.tracker = {trackVideoStart:OnVideoStart}; ``` |
| OnLinkStart | Callback when link content is clicked | ```javascript function OnLinkStart(event) { track(event.path, event.ent_id, event.src_id, event.on_id, event.interaction_id, event.user_id); //path : '/widget' } function track(var path, var ent_id, var src_id, var on_id, var interaction_id, var user_id){ //Your implementation goes here console.log(path + ", " + ent_id + ", " + src_id + ", " + on_id + "," + ", " + interaction_id + ", " + user_id); } window._wfx_settings.tracker = {trackLinkStart:OnLinkStart}; ``` |
| OnTextStart | Callback when text content is opened | ```javascript function OnTextStart(event) { track(event.path, event.ent_id, event.src_id, event.on_id, event.interaction_id, event.user_id); //path : '/widget' } function track(var path, var ent_id, var src_id, var on_id, var interaction_id, var user_id){ //Your implementation goes here console.log(path + ", " + ent_id + ", " + src_id + ", " + on_id + "," + ", " + interaction_id + ", " + user_id); } window._wfx_settings.tracker = {trackTextStart:OnTextStart}; ``` |
| OnTextEnd | Callback when text content is closed | ```javascript function OnTextEnd(event) { track(event.path, event.ent_id, event.src_id, event.on_id, event.interaction_id, event.user_id); //path : '/widget' } function track(var path, var ent_id, var src_id, var on_id, var interaction_id, var user_id){ //Your implementation goes here console.log(path + ", " + ent_id + ", " + src_id + ", " + on_id + "," + ", " + interaction_id + ", " + user_id); } window._wfx_settings.tracker = {trackTextEnd:OnTextEnd}; ``` |

## 

## Task List Functions

| **Function** | **Purpose** | **Example Code Snippet** |
| --- | --- | --- |
| onWidgetClicked | Callback when the Task List widget is clicked | ```javascript function onWidgetClicked(event) { track(event.path, event.ent_id, event.src_id, event.on_id, event.interaction_id, event.user_id); //src_id : '/tasker' } function track(var path, var ent_id, var src_id, var on_id, var interaction_id, var user_id){ //Your implementation goes here console.log(path + ", " + ent_id + ", " + src_id + ", " + on_id + "," + ", " + interaction_id + ", " + user_id); } window._wfx_settings.tracker = {trackTaskListOpened:onWidgetClicked}; ``` |
| OnWidgetLoaded | Callback when the Task List is opened | ```javascript function OnWidgetLoaded(event) { track(event.path, event.ent_id, event.src_id, event.on_id, event.interaction_id, event.user_id); //src_id : '/tasker' } function track(var path, var ent_id, var src_id, var on_id, var interaction_id, var user_id){ //Your implementation goes here console.log(path + ", " + ent_id + ", " + src_id + ", " + on_id + "," + ", " + interaction_id + ", " + user_id); } window._wfx_settings.tracker = {trackTaskListShown:OnWidgetLoaded}; ``` |
| OnWidgetScroll | Callback when the tasks in the Task List is scrolled | ```javascript function OnWidgetScroll(event) { track(event.path, event.ent_id, event.src_id, event.on_id, event.interaction_id, event.user_id); //src_id : '/tasker' } function track(var path, var ent_id, var src_id, var on_id, var interaction_id, var user_id){ //Your implementation goes here console.log(path + ", " + ent_id + ", " + src_id + ", " + on_id + "," + ", " + interaction_id + ", " + user_id); } window._wfx_settings.tracker = {trackWidgetScroll:OnWidgetScroll}; ``` |
| OnWidgetClose | Callback when the Task List is closed using the close icon | ```javascript function OnWidgetClose(event) { track(event.path, event.ent_id, event.src_id, event.on_id, event.interaction_id, event.user_id); //src_id : '/tasker' } function track(var path, var ent_id, var src_id, var on_id, var interaction_id, var user_id){ //Your implementation goes here console.log(path + ", " + ent_id + ", " + src_id + ", " + on_id + "," + ", " + interaction_id + ", " + user_id); } window._wfx_settings.tracker = {trackTaskListClosed:OnWidgetClose}; ``` |

## Pop-up Functions

### Analytics Callbacks

| **Function** | **Purpose** | **Example Code Snippet** |
| --- | --- | --- |
| trackNewPopupShown | Callback when the Pop-up is loaded. | ```javascript function trackNewPopupShown(event) { //path : '/popup/loaded’ track(event.path, event.ent_id, event.src_id, event.on_id, event.interaction_id, event.user_id); } function track(var path, var ent_id, var src_id, var on_id, var interaction_id, var user_id){ //Your implementation goes here console.log(path + ", " + ent_id + ", " + src_id + ", " + on_id + "," + ", " + interaction_id + ", " + user_id); } window._wfx_settings.tracker = {trackNewPopupShown:trackNewPopupShown}; ``` |
| trackNewPopupSkip | Callback when the Pop-up is skipped by the user. | ```javascript function trackNewPopupSkip(event) { //path : '/popup/clicked/skip’ track(event.path, event.ent_id, event.src_id, event.on_id, event.interaction_id, event.user_id); } function track(var path, var ent_id, var src_id, var on_id, var interaction_id, var user_id){ //Your implementation goes here console.log(path + ", " + ent_id + ", " + src_id + ", " + on_id + "," + ", " + interaction_id + ", " + user_id); } window._wfx_settings.tracker = {trackNewPopupSkip:trackNewPopupSkip}; ``` |
| trackNewPopupStartFlow | Callback when clicking the Pop-up leads to another Flow. | ```javascript function trackNewPopupStartFlow(event) { //path : '/popup/clicked/flow/{buttonText}’ track(event.path, event.ent_id, event.src_id, event.on_id, event.interaction_id, event.user_id); } function track(var path, var ent_id, var src_id, var on_id, var interaction_id, var user_id){ //Your implementation goes here console.log(path + ", " + ent_id + ", " + src_id + ", " + on_id + "," + ", " + interaction_id + ", " + user_id); } window._wfx_settings.tracker = {trackNewPopupStartFlow:trackNewPopupStartFlow}; ``` |
| trackNewPopupStartUrl | Callback when clicking the Pop-up leads to a link or a URL. | ```javascript function trackNewPopupStartUrl(event) { //path : '/popup/clicked/url/{buttonText}’ track(event.path, event.ent_id, event.src_id, event.on_id, event.interaction_id, event.user_id); } function track(var path, var ent_id, var src_id, var on_id, var interaction_id, var user_id){ //Your implementation goes here console.log(path + ", " + ent_id + ", " + src_id + ", " + on_id + "," + ", " + interaction_id + ", " + user_id); } window._wfx_settings.tracker = {trackNewPopupStartUrl:trackNewPopupStartUrl}; ``` |
| trackNewPopupClose | Callback when the Pop-up is closed. | ```javascript function trackNewPopupClose(event) { //path : '/popup/clicked/close’ track(event.path, event.ent_id, event.src_id, event.on_id, event.interaction_id, event.user_id); } function track(var path, var ent_id, var src_id, var on_id, var interaction_id, var user_id){ //Your implementation goes here console.log(path + ", " + ent_id + ", " + src_id + ", " + on_id + "," + ", " + interaction_id + ", " + user_id); } window._wfx_settings.tracker = {trackNewPopupClose:trackNewPopupClose}; ``` |
| trackNewPopupDoNotShow | Callback when the user clicks Do Not Show Again option on a Pop-up. | ```javascript function trackNewPopupDoNotShow(event) { //path : '/popup/checked/dontShow’ track(event.path, event.ent_id, event.src_id, event.on_id, event.interaction_id, event.user_id); } function track(var path, var ent_id, var src_id, var on_id, var interaction_id, var user_id){ //Your implementation goes here console.log(path + ", " + ent_id + ", " + src_id + ", " + on_id + "," + ", " + interaction_id + ", " + user_id); } window._wfx_settings.tracker = {trackNewPopupDoNotShow:trackNewPopupDoNotShow}; ``` |
| OnEndPopUpCloseFromButton | Callback when the Pop-up (after the Flow) is closed using the CLOSE button. | ```javascript function OnEndPopUpCloseFromButton(event) { //path : '/popup/guided_popup/start/popup_name' or '/popup/smart_popup/start/popup_name' track(event.path, event.ent_id, event.src_id, event.on_id, event.interaction_id, event.user_id); } function track(var path, var ent_id, var src_id, var on_id, var interaction_id, var user_id){ //Your implementation goes here console.log(path + ", " + ent_id + ", " + src_id + ", " + on_id + "," + ", " + interaction_id + ", " + user_id); } window._wfx_settings.tracker = {trackEndPopUpCloseFromButton:OnEndPopUpCloseFromButton}; ``` |
| OnEndPopUpCloseFromCross | Callback when the Pop-up (after the Flow) is closed using the close icon. | ```javascript function OnEndPopUpCloseFromCross(event) { //path : '/popup/guided_popup/start/popup_name' or '/popup/smart_popup/start/popup_name' track(event.path, event.ent_id, event.src_id, event.on_id, event.interaction_id, event.user_id); } function track(var path, var ent_id, var src_id, var on_id, var interaction_id, var user_id){ //Your implementation goes here console.log(path + ", " + ent_id + ", " + src_id + ", " + on_id + "," + ", " + interaction_id + ", " + user_id); } window._wfx_settings.tracker = {trackEndPopUpCloseFromCross:OnEndPopUpCloseFromCross}; ``` |
| OnEndPopUpCloseFromFlowClick | Callback when the close icon in the Flow tip is clicked. | ```javascript function OnEndPopUpCloseFromFlowClick(event) { //path : '/popup/guided_popup/start/popup_name' or '/popup/smart_popup/start/popup_name' track(event.path, event.ent_id, event.src_id, event.on_id, event.interaction_id, event.user_id); } function track(var path, var ent_id, var src_id, var on_id, var interaction_id, var user_id){ //Your implementation goes here console.log(path + ", " + ent_id + ", " + src_id + ", " + on_id + "," + ", " + interaction_id + ", " + user_id); } window._wfx_settings.tracker = {trackEndPopUpCloseFromFlowClick:OnEndPopUpCloseFromFlowClick}; ``` |

### Non-analytics Callbacks

| Function | Purpose | Online or Offline? | Example Code Snippet |
| --- | --- | --- | --- |
| onPopupClose | Callback when the Pop-up is closed. | Online | ```javascript function onPopupClose(object) { //Your implementation goes here } window._wfx_settings = {onPopupClose: onPopupClose}; ``` |
| onPopupSuccess | Callback when a Flow or content is triggered from a Pop-up. | Online | ```javascript function onPopupSuccess(object) { //Your implementation goes here } window._wfx_settings = {onPopupSuccess: onPopupSuccess}; ``` |
| onPopupSkip | Callback when the Pop-up is skipped by the user. | Online | ```javascript function onPopupSkip(object) { //Your implementation goes here } window._wfx_settings = {onPopupSkip: onPopupSkip}; ``` |
| onBeforePopUpShow | Callback before the Pop-up is displayed to the user. | Online | ```javascript function onBeforePopUpShow(object) { //Your implementation goes here } window._wfx_settings = {onBeforePopupShow: onBeforePopupShow}; ``` |
| onPopupView | Callback when the Pop-up is viewed by the user. | Offline | ```javascript function onPopupView(object) { //Your implementation goes here } window._wfx_settings = {onPopupView: onPopupView}; ``` |
| onDontShowPopup | Callback when the user clicks Do Not Show option in a Pop-up. | Offline | ```javascript function onDontShowPopup(object) { //Your implementation goes here } window._wfx_settings = {onDontShowPopup: onDontShowPopup}; ``` |
| getPopupViewCount | Callback to get the number of users who viewed the Pop-up. | Offline | ```javascript function onPopupViewCount(object) { //Your implementation goes here } window._wfx_settings = {onPopupViewCount: onPopupViewCount}; ``` |

## Smart Tip Functions

| **Function** | **Purpose** | **Example Code Snippet** |
| --- | --- | --- |
| onStaticShow**** | Callback for each time the Smart Tip is shown | ```javascript function onShow(event) {//path : '/smart_tip/live/step1' track(event.path, event.flow_id, event.flow_title, event.ent_id, event.src_id, event.on_id, event.user_id, event.step); } function track(var path, var flow_id, var flow_title, var ent_id, var src_id, var on_id, var step, var content, var user_id){ //Your implementation goes here console.log(path + ", " + flow_id + ", " + flow_title + ", " + ent_id + ", " + src_id + ", " + on_id + ", " + interaction_id + ", " + user_id step + ", " + user_id + ", " + content); } window._wfx_settings.tracker = {trackStaticShow:onShow}; ``` **** |
| onStaticClose**** | Callback when the Smart Tip is closed by pressing the cross icon**** | ```javascript function onClose(event) {//path : '/smart_tip/live/close1' track(event.path, event.flow_id, event.flow_title, event.ent_id, event.src_id, event.on_id, event.user_id); } function track(var path, var flow_id, var flow_title, var ent_id, var src_id, var on_id, var step, var content, var user_id){ //Your implementation goes here console.log(path + ", " + flow_id + ", " + flow_title + ", " + ent_id + ", " + src_id + ", " + on_id + ", " + interaction_id + ", " + user_id step + ", " + user_id + ", " + content); } window._wfx_settings.tracker = {trackStaticClose:onClose}; ``` **** |
| <meta charset="utf-8">onStaticMiss**** | Callback if the step is missed | ```javascript function onMiss(event) {path : '/smart_tip/live/miss1' track(event.path, event.flow_id, event.flow_title, event.ent_id, event.on_id, event.user_id, event.step); } function track(var path, var flow_id, var flow_title, var ent_id, var src_id, var on_id, var step, var content, var user_id){ //Your implementation goes here console.log(path + ", " + flow_id + ", " + flow_title + ", " + ent_id + ", " + src_id + ", " + on_id + ", " + interaction_id + ", " + user_id step + ", " + user_id + ", " + content); } window._wfx_settings.tracker = {trackStaticMiss:onMiss}; ``` **** |
| OnValidationValid**** | Callback when validation is passed | ```javascript function OnValidationValid(event) {path : '/smart_tip/live/miss1' track(event.path, event.flow_id, event.flow_title, event.ent_id, event.on_id, event.user_id, event.step); } function track(var path, var flow_id, var flow_title, var ent_id, var src_id, var on_id, var step, var content, var user_id){ //Your implementation goes here console.log(path + ", " + flow_id + ", " + flow_title + ", " + ent_id + ", " + src_id + ", " + on_id + ", " + interaction_id + ", " + user_id step + ", " + user_id + ", " + content); } window._wfx_settings.tracker = {trackTipValidationValid:OnValidationValid}; ``` **** |
| OnValidationError | Callback when a validation error occurs | ```javascript function OnValidationError(event) {path : '/smart_tip/live/miss1' track(event.path, event.flow_id, event.flow_title, event.ent_id, event.on_id, event.user_id, event.step); } function track(var path, var flow_id, var flow_title, var ent_id, var src_id, var on_id, var step, var content, var user_id){ //Your implementation goes here console.log(path + ", " + flow_id + ", " + flow_title + ", " + ent_id + ", " + src_id + ", " + on_id + ", " + interaction_id + ", " + user_id step + ", " + user_id + ", " + content); } window._wfx_settings.tracker = {trackTipValidationError:OnValidationError}; ``` **** |
| OnValidationRectified **** | Callback when a validation error is rectified | ```javascript function OnValidationRectified(event) {path : '/smart_tip/live/miss1' track(event.path, event.flow_id, event.flow_title, event.ent_id, event.on_id, event.user_id, event.step); } function track(var path, var flow_id, var flow_title, var ent_id, var src_id, var on_id, var step, var content, var user_id){ //Your implementation goes here console.log(path + ", " + flow_id + ", " + flow_title + ", " + ent_id + ", " + src_id + ", " + on_id + ", " + interaction_id + ", " + user_id step + ", " + user_id + ", " + content); } window._wfx_settings.tracker = {trackTipValidationRectified:OnValidationRectified}; ``` **** |

****

## **Beacon Functions**

| **Functions** | **Purpose** | **Example Code Snippet** |
| --- | --- | --- |
| OnBeaconClicked **** | Callback when a Beacon is clicked**** | ```javascript function OnBeaconClicked(event) { track(event.path, event.flow_id, event.flow_title, event.ent_id, event.src_id, event.on_id, event.user_id, event.step); } function track(var path, var flow_id, var flow_title, var ent_id, var src_id, var on_id, var step, var content, var user_id){ //Your implementation goes here console.log(path + ", " + flow_id + ", " + flow_title + ", " + ent_id + ", " + src_id + ", " + on_id + ", " + interaction_id + ", " + user_id step + ", " + user_id + ", " + content); } window._wfx_settings.tracker = {trackBeaconClicked:OnBeaconClicked}; ``` **** |
| OnBeaconShown **** | Callback****when a Beacon appears on the user screen | ```javascript function OnBeaconShown(event) { track(event.path, event.flow_id, event.flow_title, event.ent_id, event.src_id, event.on_id, event.user_id); } function track(var path, var flow_id, var flow_title, var ent_id, var src_id, var on_id, var step, var content, var user_id){ //Your implementation goes here console.log(path + ", " + flow_id + ", " + flow_title + ", " + ent_id + ", " + src_id + ", " + on_id + ", " + interaction_id + ", " + user_id step + ", " + user_id + ", " + content); } window._wfx_settings.tracker = {trackBeaconShown:OnBeaconShown}; ``` **** |
| OnWidgetLoadedEvent**** | Callback when a Beacon content is loaded | ```javascript function OnWidgetLoadedEvent(event) { track(event.path, event.flow_id, event.flow_title, event.ent_id, event.src_id, event.on_id, event.user_id); } function track(var path, var flow_id, var flow_title, var ent_id, var src_id, var on_id, var step, var content, var user_id){ //Your implementation goes here console.log(path + ", " + flow_id + ", " + flow_title + ", " + ent_id + ", " + src_id + ", " + on_id + ", " + interaction_id + ", " + user_id step + ", " + user_id + ", " + content); } window._wfx_settings.tracker = {trackWidgetLoadedEvent:OnWidgetLoadedEvent}; ``` **** |

##

## Related

- [Understand Advanced Customization ](/advanced-configuration.md)
