# Send form data to Google Tag Manager

**URL:** <https://forum.mautic.org/t/send-form-data-to-google-tag-manager/34048>\
**Category:** Product Support\
**Created:** [November 6, 2024, 10:29am UTC](https://forum.mautic.org/t/send-form-data-to-google-tag-manager/34048 "2024-11-06T10:29:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![klaasvna](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/klaasvna/32/957_2.png) [@klaasvna](https://forum.mautic.org/u/klaasvna)\
**Post date:** [November 6, 2024, 10:29am UTC](https://forum.mautic.org/t/send-form-data-to-google-tag-manager/34048/1 "2024-11-06T10:29:17Z")

</div>

My Mautic version is: 4.4.12  
My PHP version is: 8.0

My problem is: we want to setup enhanced conversion. To do so we need to send a dataLayer.push to Google Tag Manager after a form is submitted. I’m not sure how to do this?

I think I need to use something like below, but I got no clue what to insert in onResponse: function (response). I want to send the data that contacts insert in the input fieds to Google Tag Manager. For example email, firstname and lastname.

`<script> var formName = 'contactformulier'; if (typeof MauticFormCallback == 'undefined') { var MauticFormCallback = {}; } MauticFormCallback[formName] = { onResponse: function (response) { }, }; </script>`

Any help is much appreciated.
