Pagelayer form analytics – listener code?
-
Hi – I am trying to create a google analytics 4 conversion when a user completes any of the contact forms on my pagelayer based theme. I have done this before for another website that uses the plugin ‘contact form 7’. Part of the set up included adding an event listener in Google Tag Manager, code as follows:
<!-- Contact Form 7 Listener --> <script> document.addEventListener( 'wpcf7mailsent', function( event ) { window.dataLayer.push({ "event" : "cf7submission", "formId" : event.detail.contactFormId, "response" : event.detail.inputs }); </script> <!-- End Contact Form 7 Listener -->
What would the code be for pagelayer forms? If I can get the code, I should be okay to manage the rest of the set up.
Thank you
The page I need help with: [log in to see the link]
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Pagelayer form analytics – listener code?’ is closed to new replies.