Dear support,
i would like to track the buy process if someone hits the “buy now” button with the google tag manager. How can i add the Script to the “buy now” button?
Regards dondela
Hey dondela,
Here are the links for you to consider:
If you need further assistance please let us know.
Best regards,
Victoria
Thanks for this links!
The first link refers to the contact form 7 button. How can i address the “Buy now” button in woocommerce instead of the contact-form-7 Button?
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){
$att = “onclick=”_gaq.push([‘_trackPageview’, ‘/VP/XXX/XXX’]);””;
return $att;
}
Hi,
I am afraid you’ll need to contact the plugin author for more info about the issue. Making third-party plugins compatible with the theme is unfortunately beyond the support scope we offer. Sorry for that!
Best regards,
Basilis