Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1211311

    So, I’m looking to set two separate goals in Google Analytics for the same contact form.

    I have 2 different contact forms that are used on the site. One is in the footer of the home page.

    The other is on the contact page. We have all of our call-to-actions linking to the Contact page.

    On the contact page, we have an option to select ‘Book a Free Consultation.’ We’d like to track when someone selects this option and submits the form.

    Here is the code that I’m using in my functions.php:

    add_filter('avf_contact_form_submit_button_attr','avf_contact_form_submit_button_attr_ga', 10, 3);
    function avf_contact_form_submit_button_attr_ga($att, $formID, $form_params){
    	$att = "onclick=\"var _gaq = _gaq || [];_gaq.push(['_trackEvent', 'contact_form', 'submit', 'Book Free Consultation', true]);\"";
    	return $att;
    }

    I’ve also set up my GA goal like this:
    Category equals to contact_form
    Action equals to submit
    Label equals to Book Free Consultation

    When I run a test, I’m not getting any conversions or events in Real-Time Analytics.

    Please help.

    • This topic was modified 4 years, 6 months ago by Jero.
    #1211863

    Can someone please review this? I’m still having troubles.

    #1211909

    I tried going through the forums and it looks like none of the previous ones are working.

    Is anyone capable of helping me with this issue? This is time-sensitive.

    Thanks,

    #1212116

    Hi Jero,

    Can you give us temporary admin access to your website in the private content box below, so that we can have a closer look?

    Best regards,
    Victoria

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.