This post is also available in: Czech Polish

Collecting contacts

Call this method whenever a visitor input his/her e-mail address into the pop-up signup or website opt-in form. Samba will give you information whether this email address is already known or unknown. Only valid and unknown email addresses can receive welcome pop-up emails (if activated) and will be stored to the customer database.

Generated customer

In order to store the obtained email address in the database, Samba automatically creates a new customer with an ID in the form popup-*email address*.

Welcome Campaign

This method is also implicitly used in Welcome Campaigns.

diffAnalytics.submitPopupEmail(email, function(err, response))

  • email – string (valid email address)
  • If there is no error, the response includes one of these:
    • response = { emailValid: false }  //the email address is invalid
    • response = { emailValid: true, emailKnown: true } //the email address is valid, but it is already in the customer feed or it has been collected by this function before
    • response = { emailValid: true, emailKnown: false } //the email address is valid and not present in current customer database
      • Only in this case the contact is stored in database and welcome pop-up email is sent (if activated)
  • Call this method whenever the visitor input his/her email address into pop-up signup form or opt-in form at your website


Full example:

Insert this into your browser console:

diffAnalytics.submitPopupEmail('',function (err,value){console.log(value)})


This post is also available in: Czech Polish

Updated on January 14, 2022

Was this article helpful?

Related Articles