I'm trying to configure an event for GTM on form submission. I am trying to follow this guide:
https://formidableforms.com/knowledgebase/javascript-examples/javascript-after-form-submit/
I want to use the following code:
<script>
dataLayer.push({'event': 'enquiry'});
</script>
However, the notification message box seems to be a classic editor and is wrapping my <script> tags in <p> tags.
I guess it's valid code, but I'd rather not do it. Is there a better way to be tracking a form submission event? I'm using Contact Forms on another site and that appears to automatically fire an event on submission by default.
Please login or Register to submit your answer