5.2K members online now
5.2K members online now
Welcome to the Official Google AdWords Community
Find optimization tips and how-to guides and videos by the Google team, AdWords Experts and other industry experts
Collaborator ✭ ☆ ☆

AdWords Conversion code with Google Tag manager for Ajax and self-submit forms

Users with limited technical background always have always faced challenges placing Adwords conversion codes on self-submitting forms or ajax forms where URL does not change and users with limited JavaScript abilities find it practically impossible to place conversion codes.


Now with Google Tag Manager this challenge is a history, even if you don’t know anything about JavaScript you can still implement Adwords conversion codes with help of Google Tag Manager and with ZERO JavaScript.


Sounds like a magic wand, doesn’t it? Well lets see how to make this magic wand work.


Step1: Log in to your google tag manager account, if you don’t have one just create one using your gmail / Adwords logins.


Step2: Create a container and place it on all pages of your website


Step 3: Create a new tag in Google Tag Manager name it as “Event Listener for contact form submit” (I am naming this for contact form submit you can name it according to your objective)


 New Tag.png

Step 4: Choose tag type as Event >> Form Submit Listener

 Event Listener Form.PNG

Step 5Set a rule for this event listener tag to fire on page where you form is located

Rule contact page.PNG


Step 6: Select “Wait for tags” and “check validation” options and save this tag (Maximum wait is 2 seconds)

wait for tags and valication.PNG


Step 7: Create one more tag call it “Adwords conversion tracking” and in tag type select “Adwords conversion tracking”

 New tag adwords conversion tracking.PNG

Step 8: Set a rule for this tag to fire

{{event}} equals : gtm.formSubmit

{{url}} contains : contact.php (your form page)

Adwords conversion firing rules.PNG


Step 9: Create a new version of your container

create version.PNG


Step 10: Click on Update , preview & Debug

 Preview and debug.png


Step 11: Visit your form page in the same browser and take a look at debug window at the bottom of the browser

It should show event listener tag firing but conversion tag not firing


Step 12: Submit the form

Keep watching your debugger at bottom

As soon as you submit Adwords conversion tracking should say Fired on event “gtm.formSubmit”.


This means everything has worked and you are ready to go live

In your google tag manager navigate to versions >> overview >> version # which you created and click on Publish


Done !!!

No JavaScript ! No code butchering! Just wave your magic wand and enjoy




about Nikhil Parachure

Digital Marketing / Web & App Analytics expert with experience ranging from small businesses to very large portals. Across varied verticals like banking, travel, ecommerce, insurance. Google Adwords top contributor since 2013 and currently working with a leading Indian ecommerce portal. Aspiring writer, wants to be lighter!

Mini-CM Community Manager
November 2013

Great technical details. Thanks for posting, Nikhil. 

Tim J
November 2013

Is it possible to use this technique to push a Google Analytics event as well? If so how would that be done?

November 2013
Neha Gupta Top Contributor
November 2013 - last edited November 2013

Hey Nik,


That's exactly What I was looking for. Thank you so much for writing this!


- Neha

Anil Guleria
November 2013

Thank you so much 


- Anil Guleria

Pascal F
November 2013

I've tried this but I can't see the Adwords Conversion Tracking fired when I submit the form. I've put 3000 milliseconds in the wait for tags field. 


Should I just wait to see if there is any conversion comming from this Tag in Adwords?


Or are we supposed to see that the tag is fired if we're comming from an adwords ads?


Thank you for the answer Smiley Happy

November 2013


If you are checking it in debug and preview mode then GTM should show you tag firing for fraction of second on submit of the form. Are you checking this in debug and preview mode?


Joe R
December 2013

Hi Pascal, for some reason, I was having issues with the Form Submit Listener and AJAX too. If you are doing everything right (the way that Nikhil outlined) and still having issues, you might want to consider changing from the Form Submit Listener to the Click Listener and fire from the element on the page. It won't be as accurate for a form fill, but should still do the trick.

December 2013 - last edited December 2013

Hi Joe is absolutely right here I will revise this to work with other scenarios over weekend

Thanks Joe


December 2013



The scenario is like this:

I got multiple availability forms, all under the /path-to-page/page-1, /path-to-page/page-2, /path-to-page/page-3 etc.

Once the form is submitted (submit button has an id='submit'), need to record an adwords conversion.


Is this solution still working for me. If the answer is yes then for the listener tag should I use {url starts} with /path-to-page/  while for the conversion tracking again {url starts} with /path-to-page/ and {event} gtm.submit ?


Please confirm

Cheers, Giorgos