• Trying to push to GTM dataLayer and both of the following do not fire:

    document.addEventListener( 'wpcf7mailsent', function( event ) {
    
            dataLayer.push({
    
              'event' : 'wpcf7successfulsubmit',
    
              'formId': event.detail.contactFormId
    
      })
    
     });

    OR

    dataLayer.push({
    
              'event' : 'wpcf7successfulsubmit',
    
              'formId': event.detail.contactFormId
    
     });

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • You can add a “fire javascript” action for that
    Just go to your selected form -> on the actions tab select “fire javascript” and add your script there

Viewing 1 replies (of 1 total)

The topic ‘Javascript not firing’ is closed to new replies.