I tried applying a filter to add google analytics
onClick="ga('send', 'event', { eventCategory: 'proceed to paypal button', eventAction: 'click button to pay', eventLabel: 'proceed to paypal'});"
on payment in woocommerce payment button but i get some sort of syntax error on php when I do this
complete line
echo apply_filters( 'woocommerce_order_button_html', '<input type="submit" onClick="ga('send', 'event', { eventCategory: 'proceed to paypal button', eventAction: 'click button to pay', eventLabel: 'proceed to paypal'});" class="button alt" name="woocommerce_checkout_place_order" id="place_order" value="' . esc_attr( $order_button_text ) . '" data-value="' . esc_attr( $order_button_text ) . '" />' );