Jak dodać śledzenie konwersji formularza contacform7 dla wordpressa?

1) Instalacja pluginu

https://pl.wordpress.org/plugins/contact-form-7-success-page-redirects/

2) Edycja KODU (przekierowanie)  NIE DZIAŁA!!

The simplest way is utilizing Contact Form 7’s custom DOM event to run JavaScript. The following is an example of script that redirects you to another URL when the wpcf7mailsent event occurs:

1
2
3
4
5
<script>
document.addEventListener( 'wpcf7mailsent', function( event ) {
    location = 'http://example.com/';
}, false );
</script>

Embed this snippet into your theme’s template file. Obviously, you need to replace the http://example.com/ in the code to the URL you want to redirect to.

3. event

PONIŻSZA INSTRUKCJA NIE DZIAŁA!!

https://contactform7.com/tracking-form-submissions-with-google-analytics/

 

Event Tracking

Contact Form 7’s AJAX form submission can be tracked as an event. You can send a contact form submission event to Google Analytics with the following JavaScript function call:

1
ga('send', 'event', 'Contact Form', 'submit');

You don’t need to edit any JavaScript files to run this code because you can utilize on_sent_ok action hook, explained in the next section.

Using on_sent_ok

Contact Form 7 provides a JavaScript action hook called “on_sent_ok” to specify a JavaScript function that you’d like to run after a form submission successfully completes.

To set the event tracking code mentioned above to the hook, open the Additional Settings tab in the contact form editor screen, and insert the following line into the field:

on_sent_ok: "ga('send', 'event', 'Contact Form', 'submit');"

Don’t forget to quote the code properly, and make sure all of the code is on one line.

That’s it. Now, if you have set up everything correctly, Google Analytics will track successful form submissions through the contact form as an event with “Contact Form” as the event category, and “submit” as the event action.

To verify this is working correctly, you can check the Behavior > Events > Overview report page on Google Analytics 24-48 hours after a submission. At that point, you should be able to find tracked events there.

ustawienia-dodatkowe

 

cel\

 

dodatkowo w sekcji head: