var searchParams = new URLSearchParams(window.location.search); var validateEmail = (vereml) => { return vereml.match( /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/ ); }; var _paq = window._paq || []; _paq.push(['FormAnalytics::scanForForms']); var emid = ''; emid = searchParams.get('emid'); if(emid !== ""){ if(validateEmail(emid )){ emid = emid.toLowerCase(); _paq.push(['resetUserId']); _mtm.push({'uid':emid }); _paq.push(['setUserId', emid ]); } }