Form Submission Tagging

If a form on your property uses a non-standard form submission, such as via AJAX, you will need to add a call on the submission of this form to inform Decibel Insight that this has been submitted, such as the following:

decibelInsight('formSubmitted', form);

form in the above example should be replaced with the relevant HTML form element or CSS selector pointing to a form on your website, such as in the examples below.

// Trigger submission of a form identified by DOM element.
decibelInsight('formSubmitted', form);
// Trigger submission of a form identified by a CSS selector.
decibelInsight('formSubmitted', '#contact-form');

An example form can be seen below, which has an ID of "contactform". We will use this as part of our form submission.