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

How to add Google AdWords Conversion Tracking Code in JS Form WordPress


Ok, my issue is inserting the Google AdWords Conversion Tracking Code into my site so that I can track my conversions from my contact form. The issue is that my contact form is a javascript one and me being a designer not a developer, I am left to just %$#& it up. I know it's really easy, but just can't figure it out. If anyone can help or better yet do it, it would be worth $40 bucks...

I will supply the conversion code as well as the server info/ wpadmin info to drop in the code...

Answers (3)


Caroline Keim answers:

Hi, I could help you out.

Can you post your contact form and the tracking code you're trying to insert? Feel free to leave out your specific user ID in the tracking code. I just want to show you where to place this code.


Caroline Keim comments:

You need to edit your contact button seen here -

<input id="submit" class="submit" type="submit" value="Submit" name="">

So add this above the contact us button -

<script type="text/javascript" src="">
<script type="text/javascript">
function trackConv() {
var google_conversion_id = XXXXX;
var othergooglevariables = gohere;
image.src = "
+"&script=0"; }


<input id="submit" class="submit" type="submit" value="Submit" name="" onclick="javascript:trackConv();">


Ehthisham tk answers:

hey are u using jquery ajax form? if so use this
async: true,
type: "POST",
dataType: "json",
url: <Your URL>,
data: _data,
success: function( json ) {

// Track conversion
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;
if (100) {
google_conversion_value = <Your value here if any>;
$.getScript( "" );

} // success

ericnunlee comments:

Can you insert the code? I am a novice as I stated...


Richard M. answers:


I'm happy to help, and yes I can install the code: for live chat