Forum Replies Created
-
AuthorPosts
-
Hi Vinay
Thanx for the quick reply
So the whole script? Like this:
function custom_func(){
?>
<script>
jQuery(window).load(function(){// Add your jQuery script here
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=”ga(‘send’, ‘event’, ‘Download’, ‘Download campus factsheet’);””;
return $att;
}});
</script>
<?php
}
add_action(‘wp_footer’, ‘custom_func’);And where should I add this? at the end of the functions.php?
Everything is back to normal, I deleted the code in the functions.php directly via the FTP,
But since something is going wrong, could you explain to me what I did wrong?
this is the code:
onClick=”ga(‘send’, ‘event’, ‘Download’, ‘Download ams8 factsheet’);”
So I added this as following:
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=”ga(‘send’, ‘event’, ‘Download’, ‘Download campus factsheet’);””;
return $att;
}Then I copied that code at the end of the functions.php in the appearance>editor.
What went wrong?
-
This reply was modified 8 years, 11 months ago by
studiopolak2.
Oh damn
I paste the code and on a refresh, this is what I see, the whole website is not visible either:
Parse error: syntax error, unexpected ‘ga’ (T_STRING) in /home/pxef341418/domains/interxion-ams8.nl/public_html/wp-content/themes/enfold/functions.php on line 524
-
This reply was modified 8 years, 11 months ago by
-
AuthorPosts