Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

Need Google Conversion Code Added To On-Page Form WordPress

  • SOLVED

We would like to track converts from our Google AdWords campaign for converts on our website.

Just to be clear here, a "convert" here is when someone fills in the lead form on our site.

Here’s the code that is used when message is successfully submitted on any page of my site:


<script type="text/javascript">// <![CDATA[
jQuery(document).ready(function(){
jQuery('.success').hide();
jQuery('.success').clone().appendTo('.success_message');
jQuery('.success_message .success').show();
});
// ]]></script>
[content_box style="fire" title="Inquiry Form"]
<div class="success_message"></div>
[raw][contact-form subject="Hot Pepper Inquiry" to="[email protected]"] [contact-field label="Name" type="name" required="true" /] [contact-field label="Email" type="email" required="true" /] [contact-field label="Phone" type="text" required="true" /] [contact-field label="Website" type="url" /] [contact-field label="Additional Comments/ Questions" type="textarea" /] [contact-field label="What Kind Of Video Do You Want?" type="radio" options="Animation,Screencast,Whiteboard Sketch,I Dont Know Yet" required="true"/]
<br />
[/contact-form][/raw]

[/content_box]


Since we do NOT actually have a dedicated "thank you" and the thank you message renders out on the same page that the form submit happened on, we are wondering if it’s possible to put the Google AdWords Conversion code right into the thank you message when it renders?

Please let me know what you need. My website is http://hotpeppervideos.com

Answers (2)

2013-04-19

Luis Abarca answers:

The easy way is to redir to a second page with the Google Code or call it via Ajax request


Luis Abarca comments:

We end up adding a condition to show conversion code after form is submited via POST


bftech comments:

Excellent work, great communication. Solved my needs quickly and explained to me how it was done and why his approach was the best one. Fast and knows what he's doing. Reasonable rates. I would hire him again. Thanks you Luis!

2013-04-20

Andrew Wong answers:

Maybe you should look into the contact shortcodes you have there. The Javascript seems need to cooporate with the shortcode itself.