Sample

In the following example, state for the error event of each fieldName attribute is maintained. The event is sent to the analytics server only if an error occurs again.

case 'error':
        if(errorOccurred[variableValueMap.fieldName] == true) {
            pushEvent(eventName, variableValueMap)
        }
        errorOccurred[variableValueMap.fieldName] = true;
        break;

Customizing the panelvisit event

On the default AEM Forms setup, after every 60 seconds, it is checked if the window containing the adaptive form is active. If the window is active, a panelVisitevent is triggered to Adobe Analytics. It helps in ascertaining that the document or the form is active and calculating time spent on the corresponding form or document.

NOTE
The event name used to acertain activity and calculating time spent is “panelVisit”. This event is different from the panel visit event listed in the table listed above.

You can modify the scheduleHeartBeatCheck function available in the /libs/afanalytics/js/custom.js file to change or stop this event sent to Adobe Analytics at a regular interval.

Experience Manager