check if the email field is set as “Publicly updatable” under settings → Custom Fields → Email
only the fields that are set as publicly updatable can be changed by the tracking code.
but keep in mind that this is a trade: users can manipulate this code to send the data they want, for example, if the user manually change the value of the customer_email on your url, you will include the value they input, not necessarily their actual email.
also, keep in mind that email is a personal data, and adding personal data to the url can be consider a data breach since that information is openly transmitted throughout the internet and logged into browsers and routers - if you need to transmit that value between 2 pages of your website, a more secure way would be to use session cookies.
oh, another thing you should be checking is that mautic will not track user navigation for people logged in mautic. in order to test the tracking you need to open a different browser or open the browser in incognito mode.
assuming you have pages on the same domain,
on the page where you collected the e-mail, lets say to an input field called email:
<script>
//collect the e-mail from a field:
var userEmail = document.getElementById("emailField").value;
// Save data to sessionStorage
sessionStorage.setItem("email", userEmail );
</script>
Now, on the page where do you want to send the data to mautic:
<script>
(function(w,d,t,u,n,a,m){w['MauticTrackingObject']=n;
w[n]=w[n]||function(){(w[n].q=w[n].q||[]).push(arguments)},a=d.createElement(t),
m=d.getElementsByTagName(t)[0];a.async=1;a.src=u;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://xyz.com/mtk/mtc.js','mt');
// Get saved data from sessionStorage
var customer_email = sessionStorage.getItem("email");
if(customer_email != ''){
alert(customer_email);
mt('send', 'pageview', {email: customer_email});
} else {
mt('send', 'pageview');
}
</script>