• Resolved wastingdrip8447

    (@wastingdrip8447)


    Need some urgent help with my code here:

    script type=”text/javascript”>
    document.addEventListener( ‘wpcf7mailsent’, function( event ) {
    if ( ‘183’ == event.detail.contactFormId ) {
    ga( ‘send’, ‘event’, ‘Form’, ‘Submit’, ‘Enquiry Form’ );
    location = ‘https://website.com/thank-you/’;
    }
    else if ( ‘184’ == event.detail.contactFormId ) {
    ga( ‘send’, ‘event’, ‘Brochure’, ‘Download’, ‘Brochure Downloaded’ );
    location = ‘https://website.com/thank-you/’;
    }
    }, false );
    </script>

    As you can see with my setup, I implemented tracking on my forms that triggers some event in analytics then redirect to a thank you page. It was working properly on our previous landing pages but now it doesn’t seem to work. Any help will be appreciated

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Google Analytics Tracking with Redirect’ is closed to new replies.