Track every step of multi-step form

gerard_reyes Posted by: Gerard Reyes Date Posted: October 25, 2024
Back to Case Studies

Issue

The form is a three step form. The capture only happens on step 3. Sometimes, user only fills up step 1 or 2 then leaves.

Solution

Capture the lead on every step, then overwrite the lead if they continue to step 2 or 3.

<script>
(function() {
if (typeof jQuery != 'undefined') {
console.log("jQuery is available.");
jQuery(document).ready(function() {
jQuery('button.next-btn:contains("Next")').on('click', function(event) {
mcfx('capture', jQuery(this).closest('form').get(0));
console.log('MCFX capture success');
});
});
} else {
console.log("jQuery is not available.");
}
})();
</script>

Achievement

The lead is tracked whenever the user decides to stop and can track completely if the user completed the form.

Snippet/Screenshot/Link

Code

Task