• angelalgibson

    (@angelalgibson)


    It has been months and I’m still trying to get Google AdWords Conversion Tracking Code to work with a WordPress Contact Form. Really super frustrating to say the least!

    I have been using with Contact Form 7, but with their latest update it has simply become unusable for me. I was never able to get the conversion tracking to work. So I found your contact form and decided to give it a try.

    Thank you for creating this contact form plugin! If I can get it to work with AdWords tracking, I’ll be thrilled and will be replacing Contact Form 7 with your contact form on all my sites and client sites and will definitely be donating!

    What I need is a step-by-step SIMPLE explanation of how to implement Google AdWords Conversion Tracking code for your contact form including exactly where to put what script and how. You can even call it the “For Dummies Tutorial.” I don’t care as long as I can get help to get this to work.

    I have read forum posts here: https://www.ads-software.com/support/topic/adding-onsubmit-for-google-analytics?replies=8 and here: https://www.ads-software.com/support/topic/contact-form-tracking-w-google-ad-words?replies=25 but I’m still lost.

    On to my challenge / issue.

    My goal: To have a contact form on the website that works with Google AdWords conversion tracking. I don’t want the client to have to be taken to a separate Thank You Page after hitting the form submit button.

    I want the Google AdWords conversion code to track when someone clicks on the Submit button of the contact form. That is the setting I have enabled in Google AdWords. I can provide a screen grab if needed.

    What didn’t work:
    I started with Contact Form 7
    Instructions were to go here: Edit Contact Form > Form

    and paste this code in the Form Field above the form input code:

    <!– Google Code for redacted Contact Form Conversion Page
    In your html page, add the snippet and call
    goog_report_conversion when someone clicks on the
    chosen link or button. –>
    <script type=”text/javascript”>
    /* <![CDATA[ */
    goog_snippet_vars = function() {
    var w = window;
    w.google_conversion_id = redacted;
    w.google_conversion_label = “redacted”;
    w.google_conversion_value = 100.00;
    w.google_conversion_currency = “USD”;
    w.google_remarketing_only = false;
    }
    // DO NOT CHANGE THE CODE BELOW.
    goog_report_conversion = function(url) {
    goog_snippet_vars();
    window.google_conversion_format = “3”;
    window.google_is_call = true;
    var opt = new Object();
    opt.onload_callback = function() {
    if (typeof(url) != ‘undefined’) {
    window.location = url;
    }
    }
    var conv_handler = window[‘google_trackConversion’];
    if (typeof(conv_handler) == ‘function’) {
    conv_handler(opt);
    }
    }
    /* ]]> */
    </script>
    <script type=”text/javascript”
    src=”//www.googleadservices.com/pagead/conversion_async.js”>
    </script>

    Then go to Edit Contact Form > Additional Settings
    and paste this code:

    on_sent_ok: “jQuery(String.fromCharCode(60)+’img/’+String.fromCharCode(62)).attr(‘height’,’1′).attr(‘width’,’1′).css(‘border-style’,’none’).attr(‘src’,’https://www.googleadservices.com/pagead/conversion/’+google_conversion_id+’/?value=’+google_conversion_value+String.fromCharCode(38)+’label=’+google_conversion_label+String.fromCharCode(38)+’guid=ON’+String.fromCharCode(38)+’script=0&#8242;).appendTo(‘body’);”

    This has NEVER worked for me.

    Now I have installed Fast Secure Contact Form and have pasted the following code here:
    Fast Secure Contact Form Settings > Advanced > Advanced Form Settings > Success page additional HTML:

    <!– Google Code for redacted Contact Form Conversion Page
    In your html page, add the snippet and call
    goog_report_conversion when someone clicks on the
    chosen link or button. –>
    <script type=”text/javascript”>
    /* <![CDATA[ */
    goog_snippet_vars = function() {
    var w = window;
    w.google_conversion_id = redacted;
    w.google_conversion_label = “redacted”;
    w.google_conversion_value = 100.00;
    w.google_conversion_currency = “USD”;
    w.google_remarketing_only = false;
    }
    // DO NOT CHANGE THE CODE BELOW.
    goog_report_conversion = function(url) {
    goog_snippet_vars();
    window.google_conversion_format = “3”;
    window.google_is_call = true;
    var opt = new Object();
    opt.onload_callback = function() {
    if (typeof(url) != ‘undefined’) {
    window.location = url;
    }
    }
    var conv_handler = window[‘google_trackConversion’];
    if (typeof(conv_handler) == ‘function’) {
    conv_handler(opt);
    }
    }
    /* ]]> */
    </script>
    <script type=”text/javascript”
    src=”//www.googleadservices.com/pagead/conversion_async.js”>
    </script>

    QUESTION 1: Is this the correct place to put that code? My goal is NOT to have a separate Thank You Page, but to have the conversion tracked once the person clicks the Submit button on the form.

    So do I paste the Javascript code here: Fast Secure Contact Form Settings > Advanced > Advanced Form Settings > Success page additional HTML:

    Or here: Fast Secure Contact Form Settings > Advanced > Advanced Form Settings > After form additional HTML:

    Or somewhere else?

    QUESTION 2: Where do I put this code?
    on_sent_ok: “jQuery(String.fromCharCode(60)+’img/’+String.fromCharCode(62)).attr(‘height’,’1′).attr(‘width’,’1′).css(‘border-style’,’none’).attr(‘src’,’https://www.googleadservices.com/pagead/conversion/’+google_conversion_id+’/?value=’+google_conversion_value+String.fromCharCode(38)+’label=’+google_conversion_label+String.fromCharCode(38)+’guid=ON’+String.fromCharCode(38)+’script=0&#8242;).appendTo(‘body’);”

    Or do I even need this code for Fast Secure Contact Form?

    QUESTION 3: In one of the help forums there is talk about this:

    You should be able to use the settings: “Submit button input attributes” and “Form action attributes”.

    Am I supposed to be doing something with that to get Google AdWords Conversion Tracking to work?

    Also, I have already called Google AdWords support on this and they are no help. Their solution was to add a Thank You page or to not use WordPress and just use and HTML site. O.o

    Even if I use a redirect to a Thank You page, which I don’t want to do… I’m still stuck with where do I paste all the code.

    Thank you for your help.

    ~ Angela

    https://www.ads-software.com/plugins/si-contact-form/

Viewing 3 replies - 16 through 18 (of 18 total)
  • Thread Starter angelalgibson

    (@angelalgibson)

    One of the things that appears to be happening though is that a conversion is being recorded just because the Thank You page gets loaded.

    So I still have no definitive way to tell if the conversion is actually from a Google ad or from someone just filling out the form.

    Once I changed the form and added the new code and redirect URL, I sent a test message just to make sure the actual form still worked without errors.

    Then I did the VPN process.

    Just checked and there are two form conversions.

    Don’t know what to do about this.

    stiliyanstoyanov

    (@stiliyanstoyanov)

    Hi Angela,

    I am happy to hear that you got your problem resolved to some extend and thank you for listing a step by step instruction how you did it.

    The problem with the tracking comes from the fact that since the Thank You page contains the AdWords tag it will fire a conversion every time that page gets loaded.

    One way to go around this is to create an identical page without the code and use it in case someone fills in the form directly on your website while you use your Thank You page with the AdWords code only when a user comes from your ad.

    Hope this makes sense and that it will inspire you to fix your problem.

    Thread Starter angelalgibson

    (@angelalgibson)

    Hi, stiliyanstoyanov. Yes it’s not ideal. I still would rather people didn’t have to be sent to a separate thank you page. But at least conversions are being tracked now.

    I like your suggestion, but I don’t know how to implement it.

    One way to go around this is to create an identical page without the code and use it in case someone fills in the form directly on your website while you use your Thank You page with the AdWords code only when a user comes from your ad.

    Making another Thank You page without the AdWords tracking code is simple enough.

    But:

    1) The AdWords Tracking code is not on the page itself. It’s in a code box provided by the contact form plugin.

    2) Even if I had two Thank you pages: one with the AdWords code and one without, I don’t understand how to make sure someone coming to the website directly and filling out the form gets the Thank you page without the code served to them vs how someone coming from an ad gets the other Thank you page served to them.

    Also… this particular microsite was built for the sole purpose of being used in an AdWords campaign and has been marked noindex, nofollow. So technically it’s not listed in Google searches. Although the fine print says that is up to Google.

    Anyway, in theory people should not be able to find the microsite unless they see a Google Ad. So maybe that will be enough.

    I’m curious as to how to implement your suggestion though.

    Thanks again for taking time to help.

Viewing 3 replies - 16 through 18 (of 18 total)
  • The topic ‘Need SIMPLE step by step on how to implement Google AdWords Conversion Tracking’ is closed to new replies.