AdWords is now Google Ads. Our new name reflects the full range of advertising options we offer across Search, Display, YouTube, and more. Learn more

4.2K members online now
4.2K members online now
Get started with Google Ads - learn the basics to get set up for success
Guide Me

Asyncronous Conversion tracking code?

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

I am trying to set up conversion tracking on my website's cart page which utilizes asynchronous postbacks throughout the checkout process, ending in the order confirmation page.  We only want to track the completed orders, so we need to fire the conversion tracking code after the async postback to the order confirmation page.  The problem is that I cannot simply paste the combination of html and javascript code provided by Adwords into the static html portion of my page (without having incomplete orders tracked) and if I try to utilize javascript to dynamically add the html and javascript portions of the code to my page I get an error message from the Google Tag Assistant about a URL encoding error.


Would it be possible to simply add the 1 x 1 image from the <noscript> portion of the code to track conversions?  I have tried that method, but only received information from the Google Tag Assistant about a successful remarketing tag, not a conversion tracking tag.  Because of this, I do not know what, if any information would be tracked.


If not, does anyone know of an ajax or a totally javascript version of the tracking code that actually works?


1 Expert replyverified_user

Re: Asyncronous Conversion tracking code?

Explorer ✭ ✭ ☆
# 2
Explorer ✭ ✭ ☆
Have you already checked this page? If not please refer section "Track Conversions on a Dynamically Generated website"

If you still get an error, I would prefer you to wait until a conversion happens via Adwords (or you may do it) and see if you are recording the conversion in Adwords. You may want to wait for 24 to 48 hours before your first conversion reflects in Adwords

If you still could not resolve, I would suggest you using Google Analytics Goals and integrate it with Adwords. This would give you better statistical information than Adwords Conversion Code. If you have developers who can implement E-Commerce conversions in Google Analytics, you get even better transaction specific results tracked.


Re: Asyncronous Conversion tracking code?

Top Contributor
# 3
Top Contributor
Hi Jenna B,

Returning just the image part of the script works just fine. And it's the easiest way to get this done.

The problem with Ajax is Javascript returned with the content does not run. The image part of the conversion script tracks all the details.

Best of Luck!

petebardo -- Deadhead doing AdWords