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:
 /* SealMetrics Tracker Code */
 var oSm = window.oSm || {};
 oSm.account = '60a52f6ac660b269d13c3f53';
 oSm.decore = 1;
 oSm.event = 'conversion';
 oSm.label = 'form-lead';
 !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 */
Updated on April 3, 2023

Was this article helpful?

Related Articles

No Cookie Banner