1) Instalacja pluginu
2) Edycja KODU (przekierowanie) NIE DZIAŁA!!
wpcf7mailsent event occurs:
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.
PONIŻSZA INSTRUKCJA NIE DZIAŁA!!
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.
dodatkowo w sekcji head: