Skip to Content


Create a string of form fields/events as the user moves through a form.

JavaScript February 7, 2021


nebula.updateFormFlow(formID, field, info)


(Required) (String) A unique ID of the form
Default: None

(Required) (String) The name of the form field or event action
Default: None

(Optional) (String) Additional information
Default: None

Parameter Notes

Form flow data is stored in a window object called formFlow. The form ID is used as a key to store the field data.

Request or provide clarification »

Additional Notes

This function concatenates the new field/event to the existing string and then sets a custom dimension (if used). As the user moves through the form, the data is sent to Google Analytics scoped to their session.

Abandonment can be deciphered when the form flow does not end with a [success].

This function is already built into Contact Form 7 detections, but can be manually added to other forms too.

Source File

Located in /assets/js/modules/forms.js on line 353.

No Hooks

This function does not have any filters or actions available. Request one?
nebula.updateFormFlow = function(formID, field, info = ''){
    if ( typeof nebula.formFlow === 'undefined' ){
        nebula.formFlow = {};

    if ( info !== '' ){
        if ( info.length > 25 ){
            info = info.substring(0, 25) + '...'; //Truncate long info text

        info = ' (' + info + ')';

    if ( !nebula.formFlow[formID] ){
        nebula.formFlow[formID] = formID + ': ' + field + info; //Start a new form flow string beginning with the form ID
    } else {
        nebula.formFlow[formID] += ' > ' + field + info;

    ga('set',, nebula.formFlow[formID]); //Update form field history. scope: session


To override or disable this JavaScript function, simply redeclare it with the exact same function name.

nebula.updateFormFlow = function(formID, field, info){
    //Write your own code here, leave it blank, or return false.