etracker
Analytics Editions / Pricing Live-Demo
etracker
Optimiser Editions / Pricing Live-Demo
Pricing For Agencies Support

Form Analysis

  • Special requirements for the form analysis in UX Analytics need to be met:
    • All forms and their form elements must be valid HTML. Example: Each form must have an opening and closing tag. If in doubt you should check the validity with an HTML Validator in order to uncover possible errors.
    • Each form must include a unique attribute ‘name’. This serves to differentiate between the individual forms.
    • The submit button of each form must be a real button (<input type="submit" />). If this is not the case (<a class=“button“ href=“javascript:document.formular.submit();“> Continue with order</a>), the button will not be recorded as an element of the form. Nonetheless, the form will be counted as sent.
    • All elements of the form must exist in the DOM of the website. Hidden elements, which are just overlaid (e.g. via CSS), are recorded. (JavaScript) Elements which are post-loaded dynamically in the HTML code are not recorded.
    • All form elements must be “real” HTML form elements. Often, design/layout reasons are the reason why form elements are rebuilt with CSS and why the original HTML elements are located at a completely different position on the page. The form analysis only works perfectly if the HTML elements are “real”.
    • During the form processing, there is no dynamic exchange of the form elements. If the forms exchange each form element dynamically for verification purposes, the form analysis will not work as it is not possible to allocate the elements to the form.
    The forms of many web applications and websites are designed in such a way that they process their data using AJAX requests instead of the usual way by opening a following page using the Submit button. When using AJAX requests, the forms are not sent. Instead they just transfer their data to the server working in the background. So that the form analysis can still work, you must tell etracker the time that this data was communicated (form “submit” via AJAX Request). Only this way will etracker detect and save this process in the same way as the classic “Submit”.
    Note: The saving of form “submits” via AJAX requests with UX Analytics has no additional influence on the PI quota or on the other etracker products.
    The etracker API is used to transmit the “Submit” form via AJAX request. In order for the procedure to work, you need to check some prerequisites and rework the website code as described in the following. 1. In UX Analytics, select Configuration > Settings and check the Recording Conditions section to see if the recording of the pages which contain the forms is activated. Correct the setting if necessary. 2. Check the source text of the website to identify from where the data of a form is transferred to the server. Those buttons or links which are used to send contents have “on-click” events. They can, for example, come from libraries and execute AJAX requests later on. You need to integrate the calls to the etracker API directly before these sections. 3. Redesign the website code by integrating the following JavaScript call directly before the determined code sections:
    if(typeof et_vm_formSubmit == 'function') { et_vm_formSubmit(form); }
    The form must be transmitted as a parameter which should then be recorded as “sent”. Valid values are either the ID of the form as ‘string’ or the HTML form as ‘object’. Example: ID of the form as ‘string’:
    var form = 'myForm'; if(typeof et_vm_formSubmit == 'function') {     et_vm_formSubmit(form); }
    Example: HTML form as 'Object':
    var form = document.getElementById('myForm'); if(typeof et_vm_formSubmit == 'function') {     et_vm_formSubmit(form); }

Need help?
Our friendly, knowledgeable support engineers are here for you.