1. Home
  2. Cookieless Web Analytics
  3. How to track AJAX forms

How to track AJAX forms

If you are working with AJAX forms, please follow these steps to track conversions when an ajax form is submitted:

  1. Add SEAL’s tracking pixel to all your website pages.
  2. Once a user submits the form, this code will be triggered:

<script>
 /* SealMetrics Tracker Code */
 var oSm = window.oSm || {};
 oSm.account = 'xxxx-account-ID-xxxx';
/* SealMetrics Tracker Code */
var oSm = window.oSm || {};
 oSm.event = 'microconversion';
 oSm.label = 'form';
 oSm.amount = '1.01';
 !function(e){var t="//app.sealmetrics.com/tag/tracker";window.oSm=oSm,window.smTrackerLoaded?sm.tracker.track(e.event):Promise.all([new Promise(function(e){var n=document.createElement("script");n.src=t,n.async=!0,n.onload=function(){e(t)},document.getElementsByTagName("head")[0].appendChild(n)})]).then(function(){sm.tracker.track(e.event)})}(oSm);
 /* End SealMetrics Tracker Code */
</script>
Updated on julio 21, 2022

Was this article helpful?

Related Articles