Typeform is one of the popular form builders, offering numerous features and functionalities. In today’s tutorial, I’ll be covering TypeForm tracking using Google Tag Manager. These instructions apply to both the free and paid versions of Typeform, and you won’t need to insert any GTM script inside Typeform.
Typeform GTM DataLayer Code
<script>
/**
* Author: Md Hasanuzzamna
* Linkedin: https://linkedin.com/in/md-h
* Youtube: https://youtube.com/@leomeasure
* Email: info@leomeasure.com
*/
window.addEventListener('message', function(event) {
if(event.origin === 'https://form.typeform.com' && event.data.type === 'form-submit') {
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
event: 'type_form_submit',
formId: event.data.formId
});
}
});
</script>
super usefull!
Thanks a lot!
You are welcome. If you need any further help related to Google Analytics and Tracking you can contact use.
Hi, thank you for this tutorial, is there any way to track input fields ?