Reveal Method

Reveal method is used to identify the visitor of a session (basically merge their id’s) to a Waymore contact. We will store that user details which was provided in the reveal method.

waymore.reveal (userInfo)

ParametersData typeRequiredDescriptionValidation
userInfoObjecttrueIt contains the user information about that particular userThis Object must contains the field email , remaining fields are optional

User Info object properties details:

ParametersData typeRequiredDescription
emailStringtrueEmail id of that user
mobileStringfalseMobile number of that user
landlineStringfalseLandline number of that user
pushtokenStringfalse
facebookIDStringfalse
firstnameStringfalseFirst name of that user
lastnameStringfalseLast name of that user
middleNameStringfalseMiddle name of that user
genderStringfalseGender of that user
addressStringfalseAddress of that user
zipStringfalseZip code of that user
cityStringfalseCity of that user
countryStringfalseCountry of that user
currencyStringfalseCurrency of that user
gdprPolicySMSStringfalse
gdprPolicyViberStringfalse
gdprPolicyVoiceStringfalse
gdprPolicyWhatsAppStringfalse
gdprPolicyFacebokStringfalse
gdprPolicyPushStringfalse

🚧

If new parameters were passed, which were not mentioned in the above table, those values will be ignored

waymore.reveal(userInfo);  
        (or)  
window.waymore.reveal(userInfo);

📘

If you are working with direct JavaScript / HTML, we can ignore window keyword. But If you are working with any Frontend Framework / Library, use window keyword.

Example: window.waymore.reveal(userInfo)

Example:
Sample reveal method

waymore.reveal({  
  email: "[[email protected]](mailto:[email protected])",  
  firstname: "test",  
  lastname: "developer"  
});

Code Example:

The below code is a HTML project. In that we have added latest waymore.js script. In that HTML project, there was a button, if user clicks that button, we are going to send the user signup details. In that button function click, we are calling our waymore.reveal() method with user provided user Info.

<!DOCTYPE html>

<html lang="">

<head>
    <!-- Waymore web service script start -->
    <script type="module">
      !function (e) {
            let t=document,a=window,o=t.createElement("link"),s=t.createElement("script"),r=t.body,i=t.head;
            o.type="text/css";o.rel="stylesheet";o.href="https://cdn0.routee.net/sdk/dist/latest/waymore.min.css";
            i.appendChild(o);s.src="https://cdn0.routee.net/sdk/dist/latest/waymore.min.js";i.appendChild(s);let p;(p = a).addEventListener("load",()=>{
                if("routee"in p)e(p);else{let tnc=0,iId=a.setInterval(()=>{("routee"in p||tnc>20)&&(clearInterval(iId),e(p)),tnc++},500)}
            });                
        }(function (r) {
            r.routee.initialize({
                routeeToken: "$UUID_HERE",  // Add your routee token
            });
        });
    </script>
    <!-- Waymore web service script stop -->
</head>

<body>
    <!-- Email Field  -->
    <label for="email">Email:</label>
    <input type="text" id="email" name="email"><br>
      </html>