Categories
Code

Google AdWords Conversion Tracking with jQuery

So I had a need to fire off multiple Google AdWord Conversion codes on a single page, potentially multiple times, all without reloading the page. I was originally going to insert just the noscript code that comes with the tags, but ended up with this method of creating an iframe on the page and then firing off a request for a page to show the tracking code I want.

In this case I am using a PHP file which does a switch on the codes, but it could also be changed to accept .html files. This would mean that PHP or similar would not be required.