views:

352

answers:

3

Hey everyone!

I have a google adwords conversion tracking code that I need to implement basically on an onclick event. The form I am tracking submits information using AJAX and then renders a Thank you message to the page by replacing the form's div with the thank you HTML ( $('div').html("thank you....., etc"); )

I'm wondering if there's a way to a) trigger a conversion track when the SUBMIT button is clicked, or b) if I include the google script to be posted to the site in the html() function that writes to a div, will that track the conversion? or c) Any other thoughts on doing this?

I've searched a bit on this but haven't had much luck.... Thanks!

+1  A: 

Google has a help page on this topic. You can call _trackPageView from JavaScript to track almost anything you want.

Diodeus
Hey, thanks for the reply! I'm actually already using trackPageView on the website to track the pageviews of the non-existent conversion page. But I also need to track the adwords conversion (if someone clicks on an ad and then fills out the AJAX form) Can I use this for Google AdWords Conversion tracking as well? That's what I'm looking to do. The adwords code I have involves loading a 1x1 image on the page. Thanks again for the help.
infinity2k9
A: 

Try dynamically inserting the tracking code in the page after the user is converted.

+2  A: 

Use an IFRAME to call an HTML file with the conversion tracking code on it.

http://www.benjaminkim.com/?p=24

X3Maverick