I have a simple PHP function that is being called when a form is submitted:
function uc_paypal_ec_submit_form($form, &$form_state) {
$form['actions'] = array('#type' => 'actions');
$form['actions']['submit'] = array(
'#type' => 'submit',
'#value' => t('Submit order'),
);
return $form;
}
What I need is to be able to do a simple Google Analytics call like this:
_gaq.push(['_trackPageview', 'virtual/formSubmit']);
I've tried a few options, but nothing works. I don't see the call being made to Google Analytics...
How can I fix this problem?