filipr27

GA - form - submission

Apr 28th, 2023
985
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Fire this dataLayer event when a successful submission of the Contact us form occurs. The event should fire only for successful submissions. The event shouldn't fire again if the user reloads or revisits the thank-you page.
  2.  
  3. <script>
  4. window.dataLayer = window.dataLayer || [];
  5. window.dataLayer.push({
  6.  'event': 'form_submission',
  7.  'form_name': 'Contact us'
  8.  });
  9. </script>
Advertisement
Add Comment
Please, Sign In to add comment