Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • I cant get anything to work.
    I’ve decided to change to use Google tags instead set it up following a video online. copied it exactly.

    I still get no conversions tracked

    Thread Starter ecowindows

    (@ecowindows)

    Hi Paul

    I received both your tests thanks.

    The google tracking code has been working I am seeing visits to the site.

    I a bit confused with this event tracker/form submit tracker. I just copied the new code from contact form 7 help page. I’m not really sure how it works.

    I added the following code to the header.php (should it be in funtions.php ?? there was 2 examples of how to do it?)

    <script type=”text/javascript”>
    document.addEventListener( ‘wpcf7mailsent’, function( event ) {
    if ( ‘227’ == event.detail.contactFormId ) {
    ga( ‘send’, ‘event’, ‘Quote Form’, ‘submit’ );
    }
    }, false );
    </script>

    <script type=”text/javascript”>
    document.addEventListener( ‘wpcf7mailsent’, function( event ) {
    if ( ‘229’ == event.detail.contactFormId ) {
    ga( ‘send’, ‘event’, ‘Contact Form’, ‘submit’ );
    }
    }, false );
    </script>

    • This reply was modified 8 years, 4 months ago by ecowindows.
    • This reply was modified 8 years, 4 months ago by ecowindows.

    hi but if I have 2 forms with different ids?

    would the syntax be:-

    add_action( ‘wp_footer’, ‘mycustom_wp_footer’ );

    function mycustom_wp_footer() {
    ?>
    <script type=”text/javascript”>
    document.addEventListener( ‘wpcf7mailsent’, function( event ) {
    if ( ‘123’ == event.detail.contactFormId ) {
    ga( ‘send’, ‘event’, ‘Contact Form’, ‘submit’ );
    }
    }, false );
    </script>
    <?php

    <script type=”text/javascript”>
    document.addEventListener( ‘wpcf7mailsent’, function( event ) {
    if ( ‘456’ == event.detail.contactFormId ) {
    ga( ‘send’, ‘event’, ‘Quote Form’, ‘submit’ );
    }
    }, false );
    </script>
    <?php
    }

    Thread Starter ecowindows

    (@ecowindows)

    Hi thanks for the reply.
    No im not seeing anything in the Events 0
    and the goals are 0

    I wanted to set a goal up for each of the 2 forms?

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