Typeform Tracking with Google Tag Manager & Google Analytics

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>

Leave a Comment

Your email address will not be published. Required fields are marked *

Contact Us

Please contact us for expert guidance & personalized solutions to maximizing the potential of Google Analytics for your business.

Send Us A Message