javascript - Contact form 7 - Google Analytics Tracking -


i`m trying track submitted contact forms in google analytics contact form 7. tried following:

  1. i placed code

    on_sent_ok: "ga('send', 'event', 'contact form', 'submit');"

in additional settings. not work. method supported until end of 2017. new method "dom events", so...

  1. ...i tried dom events. placed code

    <script> document.addeventlistener( 'wpcf7mailsent', function( event ) { ga('send', 'event', 'contact form', 'submit'); }, false ); </script>

in head of template. also, not work.

  1. i tried wordpress plugin "contact form 7 google analytics" , doesn´t work either. no matter way tried: site doesn´t execute line:

    ga('send', 'event', 'contact form', 'submit');

no event appears in live view of google analytics. had problem few months ago (wordpress , google analytics events) new site , think it`s same problem. there must reason?

you can find new site talking here.

i happy help. thank you!

edit: new hint: after submitting form there no "thank message". nothing happens url changes http://page.xyz/kontakt/#wpcf7-f4-p18-o1 think not normal?

how did set event in google analytics? maybe need pass value in ga function.

enter image description here

if set value 0 here , "greater than" selected, have pass value of '1' in ga send function.


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -