WordPress.org

Ready to get started?Download WordPress

Forums

Contact Form 7
Piwik & Thank You Redirect with Contact 7 (5 posts)

  1. sjbalza
    Member
    Posted 2 years ago #

    Goal: To use contact form 7, when the person fills out the form they are redirected to a new page and execute the piwik javascript goal code (google analytics alternative) which I added to the "Additional Settings" part of Contact 7. I can get the redirect to work, but for some reason not the piwik code. Here are my seperate codes, do I need to combine them somehow like the google analytics code example you gave on contact7's website?

    Redirect code in "Additional Settings"
    on_sent_ok: "location.replace('http://mysite.com/thank-you-page');"

    Piwik code in "Additional Settings" - Cant get to work :(

    <script type="text/javascript">
    piwikTracker.trackGoal(2);
    </script>

    Please help!?!

    http://wordpress.org/extend/plugins/contact-form-7/

  2. sjbalza
    Member
    Posted 2 years ago #

    ?? anyone!?!

  3. Adam Chahl
    Member
    Posted 2 years ago #

    You need to use:

    on_sent_ok:piwikTracker.trackGoal(1);

    Cheers,
    Adam

  4. thob
    Member
    Posted 2 years ago #

    @adamchahl: if you track different forms you just create a 2nd goal adding on_sent_ok:piwikTracker.trackGoal(2);?

  5. Adam Chahl
    Member
    Posted 2 years ago #

    I would assume so yes, although I have not tried this myself.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic