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=''+window.adnDataLayer.account_id;'adn';if(typeof window.tagLoaded=='undefined'){document.getElementsByTagName('head')[0].appendChild(adn)}else{adnSendData()}})();

Updated on noviembre 22, 2021

Was this article helpful?

Related Articles

Leave a Comment