WordPress.org

Ready to get started?Download WordPress

Forums

Contact Form 7
GA Event Tracking doesn't work (5 posts)

  1. sinansaglam
    Member
    Posted 9 months ago #

    Hi,

    we're trying to implement Google Analytics tracking for the Contact Forms on our website, but it doesn't work.

    We already tried those codes:

    on_sent_ok: "_gaq.push(['_trackEvent', 'Contact', 'Lead', 'Contact Form']);"
    on_sent_ok: "_gaq.push(['_trackPageview', '/kontakt/danke/']);"

    And the GA code: (with ID changed)

    <script type="text/javascript">

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

    (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
    })();

    </script>

    The goals ar set up properly. We don't know what to do to get it working...

    Can anyone help us?

    Thank you so much,
    Sinan Saglam

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

  2. Takayuki Miyoshi
    Member
    Plugin Author

    Posted 9 months ago #

    Can I see your site?

  3. sinansaglam
    Member
    Posted 9 months ago #

    Yes, totally forgot to post the link:

    http://lichtathleten.com/kontakt/

  4. Takayuki Miyoshi
    Member
    Plugin Author

    Posted 9 months ago #

    On the page, AJAX submission is not working.

    See Why isn’t My AJAX Contact Form Working Correctly?

    When AJAX submission doesn't work, on_sent_ok JavaScript hook doesn't work, neither.

  5. treatment
    Member
    Posted 9 months ago #

    I am having the same issue. I have set up event tracking in the Additional Settings field as such -

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

    I have set up the goals in the account yesterday. Does it take longer than 24 hours to properly set up? My site is "thebestrehabs.com" if you could look into it.

    I look forward to your reply.

Reply

You must log in to post.

About this Plugin

About this Topic