Let's talk now.
407-476-6930 / 850-366-8392 (PCB)

Nerd Stuff: How to Use Google Conversion Code w/ AJAX

by Brandon Welch
Web Designer/Developer & Web Expert
Connect with me: | Facebook | LinkedIn

So, an issue many can run into is using AJAX on forms, and online transactions, and actually tracking the event.

Tracking the event would allow the user to know how affective the Google Adwords Campaign was being.

We use a neat trick that we found…its really cleaver.

When the AJAX is fired, and is successful, we then insert an IFRAME on the page that called the AJAX.

The IFRAME url is a plain html page that contains the tracking code. (Google)

That’s it! Easy Cheesy.

Here is a snippet of the Code:
function ppcconversion() {
var iframe = document.createElement('iframe');
iframe.style.width = '0px';
iframe.style.height = '0px';
iframe.src = 'http://www.yourdomain.com/_tracking/google.html';

Any Questions? If so, just Contact Us