Home › Forums › Quform WordPress › adding date from form to event for google tag manager › Reply To: adding date from form to event for google tag manager
hi,
thanks for your answer. now it does work when submitting the form.
but i need to send two form fields also so i have more information about the content.
so waht i need is to add some kind of this into it:
jQuery(function ($) {
$(‘.quform-form-1’).on(‘quform:successStart’, function ()
{ dataLayer.push({
‘event’: ‘Contact Form’
‘produkt_id’: ‘form_field22’,
‘produkt_name’: ‘form_field11’
});
});
});
so my problem is how can i get the data that the user filled in the field to push it to gtm (see produkt_id and produkt_name)? form_field22 and form_field11.
i hope i was able to desscribe it. so i just need to know how to push the form field data 🙂