My name is Marko
I've been a software developer for 9 years. For the past years I've enjoyed being a helpful partner of marketers.
A GTM tag that pushes data from AJAX forms into data layer.
This is an upgraded version of a widely used Lunametrics AJAX listener. Lunametrics’ version of the script has been working very well over the years, but with the rise of the Single Page applications (SPAs) the script oftentimes doesn’t work. It is usually caused by missing jQuery library that Lunametrics’ script depends on.
This script works without any dependencies and should work for all websites.
There are 2 options you can use to integrate the script.
Importing a container script is the quickest way to get started. It will automatically create a custom HTML tag with all the required variables into your GTM account for you to use.
Next learn how to use AJAX listener.
More advanced users can set up the tag and variables themselves without using the pre-built script.
Differences between Lunametrics listener and this script are minimal and switching them shouldn’t take more then a minute.
All GTM variables that were working with Lunametrics keep working as is and there’s no need to change any of them. The only thing you need to do is replace the custom HTML tag with this script. Once this is done then everything should work as it did before.
This problem is more common with Single Page applications.
The easiest way to find out if your website has jquery enabled is to ask the developers. Another option is to use a browser console
This script is dependency free and should work regardless of what technology the website is built with.
The tag is modified from a frequently used Lunametrics script. Everything that works with Lunametrics tag will keep working the same way.
Once the script is configured in GTM then use the following tutorials on how to use it: