Sending email addresses to Nosto
Collecting email addresses from a form field
jQuery("form input.nosto_email_capture").each((idx, input) => {
if (!input.form) {
return;
}
input.form.onsubmit = event => {
var email = input.value;
if (email) {
// Push customer information to current visit
nostojs(api => {
console.log("Collecting email " + email);
api.customer({email: email});
});
} else {
console.log("No email specified");
}
}
});Last updated
Was this helpful?