Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <form id="form1" action="/submit-form" method="post">
- <!-- Form fields go here -->
- <input type="submit" value="Submit">
- </form>
- <script>
- document.getElementById('form1').addEventListener('submit', function(event) {
- event.preventDefault();
- dataLayer.push({
- 'event': 'formSubmission',
- 'formLocation': 'Location A',
- });
- // Perform any additional form submission handling here
- // For example, you can submit the form data via AJAX.
- });
- </script>
Advertisement
Add Comment
Please, Sign In to add comment