Support » Plugin: Contact Form 7 » Setting Up Google Analytics Conversions

  • Hello,

    I would really appreciate it if someone could let me know how to setup Contact Form 7 so I can track conversions (complete the form) in Google Analytics.

    It is my understanding I need to add some code to the Additional Settings area of the Contact Form as well as setup a goal in Google Analytics with the url of my contact page.

    I need to know the code I need to add in the additional settings area.


Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Takayuki Miyoshi


    What does page tracker object mean? I am not sure what I have used so I can’t update the code per the instructions.


    Plugin Author Takayuki Miyoshi


    Can I see your site?


    Here is the url for the contact form.

    Plugin Author Takayuki Miyoshi


    Look into the HTML source. You can find this snippet there.

    var _gaq = _gaq || [];
    _gaq.push(['_setAccount', 'UA-XXXXXXXX-X']);

    In your site, _gaq is used as a name of a page tracker object, so you can use the same code which used in the example.

    on_sent_ok: "_gaq.push(['_trackEvent', 'Contact Form', 'Submit']);"

    Thank you very much. I have entered this code into my Contact form 7.

    How do I setup Google Analytics with this information? I have currently setup a Goal in conversions to be when a person goes to my contact us page but of course I don’t want to count when someone goes to the page but rather when they fill out the form.

    Do I need to do anything special to my conversion goal per what I have setup on the contact form?

    Thanks again.

    Plugin Author Takayuki Miyoshi


    No, you don’t need any other setup on the contact form. That code tracks a submission as an event, so you can see the count in GA’s Behavior > Events.

    If you want to do something more, try consulting GA’s doc.

    I just set up this tracking and it appears to work. However, I am no longer getting the green box “success” message when the form is submitted and the form fields are not cleared. I’m afraid that because of this people will submit the form multiple times. Any ideas?

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Setting Up Google Analytics Conversions’ is closed to new replies.