PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Google Analytics Integration

  1. I'm trying to track form submissions via Goals in Google Analytics. In the confirmation text of my forms I have:

    <script type="text/javascript">pageTracker._trackPageview('/contact/contact-form.html');</script>

    Which doesn't seem to work. My analytics javascript code is in the header section of my page so I know that the page tracker variable has already been created.

    Viewing the source of the page after the form has been submitted, the javascript code seems to be echoed out properly.

    Anyone know of a way to make this work? I'd hate to make confirmation pages for each and every form I have on my site.

    Posted 14 years ago on Saturday February 20, 2010 | Permalink
  2. Hello,

    I need exactly do the same. I want to track my form submissions in Analytics.

    Seems that with Contact Form 7 it is extremely easy to do. What about Gravity? How can this be achieved?

    Thank you!

    Posted 14 years ago on Thursday April 22, 2010 | Permalink
  3. It should work by putting it in the confirmation text box. It accepts HTML and javascript. This is how others are doing it, including people like Joost de Valk who is a Google Analytics and SEO expert. So it's working for others, you may want to double check everything is correct.

    Posted 14 years ago on Friday April 23, 2010 | Permalink
  4. BenjaminRMueller

    Do you think it should work OK if I combine text and the script...something like:

    <body onLoad="javascript:pageTracker._setVar('Admin_User');">

    Thanks for contacting helping out the analytics team!

    Posted 13 years ago on Friday March 4, 2011 | Permalink
  5. Yes, you can put text and script in the Confirmation Text box.

    Posted 13 years ago on Friday March 4, 2011 | Permalink
  6. BenjaminRMueller


    Posted 13 years ago on Friday March 4, 2011 | Permalink
  7. It won't work because the text and scripts put in the Confirmation Text box is displayed in a Iframe on the page ... :(

    Posted 12 years ago on Tuesday January 24, 2012 | Permalink