Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Takayuki Miyoshi

    (@takayukister)

    Thread Starter gangemipasquale

    (@gangemipasquale)

    thank you, i’ve committed an error, i meant google adwords conversions, sorry and thank you for the answer.

    citydan

    (@citydan)

    I also need to know how to make Google ADWORDS conversion tracking work with Contact Form 7.
    I understand that you can call javascript functions with the on_sent_ok parameter in the Contact Form admin settings.

    What I need are step-by-step instructions:
    1. where do I put the conversion tracking code provided by Google Adwords? This is 20 lines of code.
    Can I somehow put this into the on_sent_ok field? If not, how to do it?

    thebadone411

    (@thebadone411)

    @takayuki

    I’ve read that page but I think it was written before Google Analytics started using their asynchronus code.

    Does the code to set this up change if I’m using asynchronus analytics code on my site?

    Thanks

    Plugin Author Takayuki Miyoshi

    (@takayukister)

    Tracking Form Submissions with Google Analytics

    Note: If you use newer version of the tracking code, you need to run this code instead:

    _gaq.push(['_trackPageview', '/mysite/thank-you.html']);

    thebadone411

    (@thebadone411)

    So nothing about on_sent_ok ?

    I would like to know solution for this also!
    on_sent_ok:”_gaq.push([‘_trackPageview’, ‘/mysite/thank-you.html’]);” did not work.

    Is it with or without on_sent_ok: ?

    I would also like to know how to add the javascript code for conversion tracking on google adwords.

    Can we enter more than one line of Java after the on_sent_ok tag?

    For example, setting up one conversion with Ad Words requires entering the following Java into the ‘thank you’ page:

    <!– Google Code for Availability Enquiry Conversion Page –>
    <script type=”text/javascript”>
    /* <![CDATA[ */
    var google_conversion_id = 1066013591;
    var google_conversion_language = “en”;
    var google_conversion_format = “3”;
    var google_conversion_color = “ffffff”;
    var google_conversion_label = “AwLUCPGitAIQl6eo_AM”;
    var google_conversion_value = 0;
    /* ]]> */
    </script>
    <script type=”text/javascript” src=”https://www.googleadservices.com/pagead/conversion.js”&gt;
    </script>
    <noscript>
    <div style=”display:inline;”>
    <img height=”1″ width=”1″ style=”border-style:none;” alt=”” src=”https://www.googleadservices.com/pagead/conversion/1066013591/?label=AwLUCPGitAIQl6eo_AM&guid=ON&script=0″/&gt;
    </div>
    </noscript>

    How can I enter all this code into Conactform7?

    hi, will it work to use commerce code, if we create an .html with the commerce code? i mean that all the code posted by puddy127 would be put into some file like “/mysite/thank-you.html” and while using the query “_gaq.push([‘_trackPageview’, ‘/mysite/thank-you.html’]);” the wanted commerce form will be run?

    You don’t need to do that.

    If what you want is a redirect, just using:
    on_sent_ok: "location = 'https://example.com/';"

    (as explained here)

    If what you need is just tracking of conversions for Analytics, use this.

    And if what you need is tracking AdWords conversions, set up the conversion variables as globals with a “<script>” tag in the conversion page, and call the conversion code from on_sent_ok (e.g., using jQuery)

    In the body/header of your conversion page:

    <script type="text/javascript">
    var google_conversion_id = <Your ID Here>;
    var google_conversion_language = "en";
    var google_conversion_format = "3";
    var google_conversion_color = "ffffff";
    var google_conversion_label = "<Your Label here>";
    var google_conversion_value = 0;
    </script>

    And in the bottom part of Contact Form 7 settings:

    on_sent_ok: $jQuery.getScript( "https://www.googleadservices.com/pagead/conversion.js" );

    I think this should work.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘[Plugin: Contact Form 7] How to add google analytics conversion tracking on contact form 7’ is closed to new replies.