• Hello!
    I am trying to track my contact form on google Analytics following this guide: https://contactform7.com/tracking-form-submissions-with-google-analytics/
    However, I did not managed to do it as the instructions were not that clear…

    – l’d like to track only successful emails, where should I put this code?
    document.addEventListener( ‘wpcf7mailsent’, function( event ) {
    ga( ‘send’, ‘event’, ‘Contact Form’, ‘submit’ );
    }, false );

    I did put the code between <head </head
    <script>
    document.addEventListener( ‘wpcf7mailsent’, function( event ) {
    ga(‘send’, ‘event’, ‘Contact Form’, ‘submit’);
    }, false );
    </script>

    Can someone who successfully set up this method can explain to me step by step the operations? I will be really grateful.

    PS: the on_sent_ok method is working, but as it’s said to be abolished, I would like to set up through the first method

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Track Form in Google Analytics’ is closed to new replies.