WordPress.org

Forums

Contact Form 7
Setting Up Google Analytics Conversions (9 posts)

  1. justin39515
    Member
    Posted 1 year ago #

    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.

    Thanks!

    https://wordpress.org/plugins/contact-form-7/

  2. Takayuki Miyoshi
    Member
    Plugin Author

    Posted 1 year ago #

  3. justin39515
    Member
    Posted 1 year ago #

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

    Thanks.

  4. Takayuki Miyoshi
    Member
    Plugin Author

    Posted 1 year ago #

    Can I see your site?

  5. justin39515
    Member
    Posted 1 year ago #

    sure.

    Here is the url for the contact form.

    http://curbsidesharpening.com/contact-us/

  6. Takayuki Miyoshi
    Member
    Plugin Author

    Posted 1 year ago #

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

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

    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']);"
  7. justin39515
    Member
    Posted 1 year ago #

    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.

  8. Takayuki Miyoshi
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  9. Greg Falken
    Member
    Posted 1 year ago #

    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?

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Contact Form 7
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic