• NECAnGeL

    (@necangel)


    A few days a go i insert in to the themes function.php this code:

    add_action( 'wp_footer', 'mycustom_wp_footer' );
    function mycustom_wp_footer() {
    ?>
    <script type="text/javascript">
    document.addEventListener( 'wpcf7mailsent', function( event ) {
    if ( '8385' == event.detail.contactFormId ) {
    ga( 'send', 'event', 'SEO Linkbuilding adviesrapport', 'submit' );
    }
    }, false );
    </script>
    <?php
    }

    This code is from the WP environment:
    [contact-form-7 id="8385" title="Aanvraagformulier SEO & Linkbuilding adviesrapport"]
    The first days the tracking was working and after update the theme yesterday it is not working. Only i do not understand and place the code only back into functions.php off the theme.

    I have contact with the people of the theme and the have no idea !!!

    The page with the form

    • This topic was modified 7 years ago by NECAnGeL.
    • This topic was modified 7 years ago by NECAnGeL.
    • This topic was modified 7 years ago by NECAnGeL.
    • This topic was modified 7 years ago by NECAnGeL.

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Takayuki Miyoshi

    (@takayukister)

    This is a question about the theme you use, and the theme is a commercial one. Since posting about commercial product is not allowed in these volunteer-based support forums, you should contact the theme seller for support instead of posting here.

    Thread Starter NECAnGeL

    (@necangel)

    I have a reaction of the theme only i think this is not the solution.

    Tanvir (smartdatasoft)
    Mar 16, 11:05 AM +06
    HI,
    I understand,
    when you submit the form it returns error,
    ga not init,
    So maybe previous function.php also include google analytics js file,
    when you update, the file is replaced. so it’s not working now.
    So you need to add ga file again, otherwise, the script doesn’t understand what is “ga ”
    for why its giving error. So you must include ga js file first.
    Thank you
    Md. Tanvir Hasan

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Tracking Form, Google Analytics not working after it works’ is closed to new replies.