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:
window.adnDataLayer = window.adnDataLayer || {};
window.adnDataLayer.account_id = 'XXXXXXXXXXXXXXXXXXX'; // Insert your account ID here
window.adnDataLayer.conversion_type = 'form_sale';
window.adnDataLayer.amount = '1.01';
(function(){var adn=document.createElement('script');adn.type='text/javascript';adn.async=1;adn.src='https://app.sealmetrics.com/tag/tags?acc='+window.adnDataLayer.account_id;adn.id='adn';if(typeof window.tagLoaded=='undefined'){document.getElementsByTagName('head')[0].appendChild(adn)}else{adnSendData()}})();

Updated on febrero 24, 2022

Was this article helpful?

Related Articles

Leave a Comment