setEmail Function

This function needs to be called each time a guest registers, logs in or fills in the email address in a form on the website (e.g. Contact or Newsletter Form).

setEmail Function Parameters

Field Type Required Description
email text True Visitor email address. Ex. john.doe@example.com
name text False Visitor name. Ex. John Doe
phone text False Visitor phone number
city text False Visitor city
sex numeric False This parameter is numeric and has two possible values: 0 = woman and 1 = man
birthday text False Visitor birthday in format DD-MM-YYYY
callback_function function False with this parameter you can define a function that will be executed after setEmail's behaviour is finished.

Examples

function call with all parameters and callback function set

     _ra.setEmail({
         "email": "johndoe@example.com",
         "name": "John Doe",
         "phone": "0777222000",
         "city": "London",
         "sex": 1,
         "birthday": "29-08-1989"
     }, function() {
         console.log("setEmail information have been sent");
    });

function call with only the required parameter

    // function call with only the required parameter

    _ra.setEmail({
        "email": "johndoe@example.com"
    });