Tracking form submissions

Yev Fes asked on September 25, 2015 15:55

We need to track form submissions using google tag manager, which is a client requirement, to track users who are, for instance, contacting support or submitting other forms using our site. Essentially, the tag manager tracks form submission events on pages, and reports on the submitted field values. It is important that there are input fields, and a submit button that posts (as far as I can tell). That's how google detects that event.

We are using Kentico 8.2 and have used the form builder to build all our forms. Forms are rendered using On-Line Form web part.

Maybe I'm doing something wrong, but there is no client-side validation on the forms. Every submission posts back to the server, performs validation, and returns with errors (if any) or submits the form. Is there something I'm missing to get the client-side validation to work? In this scenario, every single post is tracked in google tag manager, including posts of invalid (incomplete) forms. As you can see, this is far from ideal.

The only way I could "simulate" client-side validation is by enabling ajax/update panel on the form web part.

However, in this scenario there is no form submission event at all, and google tag manager cannot track that event.

Is it possible to use the form builder to create a regular html form that will a) validate on client side b) fall back to server-side validation. Or is the only alternative to build a custom web part with jquery validation and custom back-end validation?

Recent Answers

Bryan Soltis answered on September 25, 2015 15:59


You could use a "Custom Layout" in your Form and insert any client code (JS-based) validation in the layout. That may be able to get the functionality you need to track the submission back to Google.

1 votesVote for this answer Mark as a Correct answer

Yev Fes answered on September 25, 2015 16:40

Thank you, Bryan, so Kentico form builder generates forms that are not client-side validated?

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.