Hi!
I have 5 different pages that need 5 different tracking codes when the submit button is pressed. How can I insert them separretly for each page?
Thanks!
Hi EuroInfoSys!
Your doing this? http://kriesi.at/documentation/enfold/add-onclick-event-to-the-contact-form-submit-button/
You can target separate pages like so.
add_filter('avf_contact_form_submit_button_attr','avia_add_submit_attributes_to_cf', 10, 3);
function avia_add_submit_attributes_to_cf($att, $formID, $form_params){
if ( is_page( 12 ) ) { $att = "onclick=\"_gaq.push(['_trackPageview', '/VP/XXX/XXX']);\""; }
if ( is_page( 13 ) ) { $att = "onclick=\"_gaq.push(['_trackPageview', '/VP/XXX/XXX']);\""; }
return $att;
}
And change “12, 13” to the IDs of your pages.
Cheers!
Elliott
Good morning, I have the need to trace a contact form and I have seen the reference documentation and this post.
Seeing the date that the thread has, I would like to confirm that the solution is still the same.
In my case I need to apply it in a multisite configured so that the sites are located in directories.
Another question that generates me is to know what part of the tracking code I have to enter in its function. Just the ID or is it necessary to include the entire Script?
THANK YOU !