alexandrarosi
Forum Replies Created
-
Forum: Developing with WordPress
In reply to: Create event when Form Submittedform_datalayer() is called to Theme Functions (functions.php).
Also I downloaded the plugin ‘wpcf7mailsent’ and I have some questions in order to set up this plugin:I use the plugin Contact Form 7 and created LTE Form.Page id that uses this form is 3355 (https://www.mywebsite.gr/wp-admin/post.php?post=3355&action=edit&classic-editor)
I want to track the event when form is submitted.
So I have to check to Tracking options “Track as Google Analytics (event)?” and event action has to be “sent” ?Also Event category is LTE Form ??
In addition as url I am using :https://www.mywebsite.gr/wp-admin/admin.php?page=wpcf7&post=3433&action=edit
Could you please tell me if I am filling the fields of plugin DOM Tracking correctly ??
Thank you!
Rosi Alexandra- This reply was modified 4 years ago by alexandrarosi.
- This reply was modified 4 years ago by alexandrarosi.
Forum: Developing with WordPress
In reply to: Create event when Form SubmittedI am using the plugin Contact in order to create the Contact Form
I added to the code of the Theme functions (functions.php) in the if field of function form_datalayer()
is_page (3355)// Form datalayer function form_datalayer() { if ( is_page(1737) || is_page(1739) || is_page(115) || is_page(2613) || is_page(2103) || is_page(2819) || is_page(20) || is_page(1946) || is_page(1853) || is_page(67) || is_page(2265) || is_page(1188) || is_page(2236) || is_page(39) || is_page(2307) || is_page(39) || is_page(90) || is_page(2179) || is_page(415) || is_page(1220) || is_page(113) || is_page(3355) ): ?> <script> document.addEventListener( 'wpcf7mailsent', function( event ) { dataLayer.push({ 'event': 'Form_Submission', 'Service': document.querySelectorAll('select[name="contact-lessons"]')[0].value, 'Location': document.querySelectorAll('select[name="contact-locations"]')[0].value }); }, false ); </script>
which is the id of the page that has the form but does not seem to work.
- This reply was modified 4 years ago by alexandrarosi.
- This reply was modified 4 years ago by alexandrarosi.
Forum: Developing with WordPress
In reply to: create link to Contact formI founded myself eventually
Problem solvedForum: Developing with WordPress
In reply to: insert google tags toThank you!!