WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] [Plugin: Contact Form 7] - Google Analytics tracking, JS error (10 posts)

  1. crs1138
    Member
    Posted 2 years ago #

    The issue I am having is, when I add the pageTracker code to the on_sent_ok code the verification box no longer appears.

    on_sent_ok: "pageTracker._trackPageview('/contact/send-lisa.html');"

    This is indeed because of a Javascript error. The error is:

    Uncaught ReferenceError: pageTracker is not defined

    See it for yourself at http://pocketoxfordtheatre.com/contact/

  2. crs1138
    Member
    Posted 2 years ago #

    I just want to clarify, that I'm trying to do what is described at http://contactform7.com/tracking-form-submissions-with-google-analytics/

  3. crs1138
    Member
    Posted 2 years ago #

    I've resolved the issue by using, what's in that article as a note.

    Note: If you use newer version of the tracking code, you need to run this code instead:
    _gaq.push(['_trackPageview', '/mysite/thank-you.html']);

  4. Richard Bland
    Member
    Posted 1 year ago #

    This is still an issue for me even though I am using the newer tracking code. Do I still put on_sent_ok: or just the code.

  5. dpcdpc11
    Member
    Posted 1 year ago #

    This is still an issue for me even though I am using the newer tracking code. Do I still put on_sent_ok: or just the code.

    Yes you have to put the "on_sent_ok" function as well.
    I can confirm that it works.
    Here's a tutorial that shows the whole process in details: http://www.searchingsam.com/wordpress-tracking-contact-form-7-conversions-in-google-analytics/#.UYJRcbWLDhC

  6. jodzeee
    Member
    Posted 1 year ago #

    I'm using this:

    on_sent_ok: "_gaq.push(['_trackPageview', '/contact-us/thank-you']);"

    ...but after submit, the form does not reset and the success message does not appear. Is it working for you?

  7. jodzeee
    Member
    Posted 1 year ago #

    I tried adding the <script> tag and that seems to have fixed it. But is this going to break something else?

    <script>on_sent_ok: "_gaq.push(['_trackPageview', '/contact-us/thank-you']);"</script>

  8. jodzeee
    Member
    Posted 1 year ago #

    I'm about to give up. I'm not getting any analytics coming through. Any advice?

  9. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    Any advice?

    Yes, start your own thread instead of posting in an old one already marked resolved - see:

    http://codex.wordpress.org/Forum_Welcome#Where_To_Post

  10. jodzeee
    Member
    Posted 1 year ago #

    Thank you. I've visited a lot of posts and didn't notice this one had been marked resolved.

Topic Closed

This topic has been closed to new replies.

About this Topic