• Resolved timotime

    (@timotime)


    I really dont get it. I had this problem also with a similar site.
    Notice: I didn′t build this site.

    Problem:
    I`m trying to track submitted contact forms in google analytics with contact form 7. I tried the following:

    1. I placed the code

    on_sent_ok: “ga(‘send’, ‘event’, ‘Contact Form’, ‘submit’);”

    in the additional settings. Does not work. This method is supported until the end of 2017. The new method is “DOM events”, so…

    2. …I tried it with DOM events. I placed the code

    <script>
    document.addEventListener( ‘wpcf7mailsent’, function( event ) {
    ga(‘send’, ‘event’, ‘Contact Form’, ‘submit’);
    }, false );
    </script>
    in the head of the template. Also, does not work.

    3. I also tried a WordPress plugin “Contact Form 7 Google Analytics” and this doesn′t work either. No matter which way I tried: The site doesn′t execute the line:

    ga(‘send’, ‘event’, ‘Contact Form’, ‘submit’);

    No event appears in the live view of google analytics. I had this problem a few months ago (WordPress and Google Analytics Events) but this is a new site and i think its the same problem. There must be reason? I dont have this problem with other wordpress-sites.

    Maybe important: After submitting a form there is no “thank you message”. Nothing happens an the url changes to https://page.xyz/kontakt/#wpcf7-f4-p18-o1 I think this is not normal?

    I am really happy about any help. Thank you!

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

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