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)
Parameters | Data type | Required | Description | Validation |
---|---|---|---|---|
userInfo | Object | true | It contains the user information about that particular user | This Object must contains the field email , remaining fields are optional |
User Info object properties details:
Parameters | Data type | Required | Description |
---|---|---|---|
String | true | Email id of that user | |
mobile | String | false | Mobile number of that user |
landline | String | false | Landline number of that user |
pushtoken | String | false | |
facebookID | String | false | |
firstname | String | false | First name of that user |
lastname | String | false | Last name of that user |
middleName | String | false | Middle name of that user |
gender | String | false | Gender of that user |
address | String | false | Address of that user |
zip | String | false | Zip code of that user |
city | String | false | City of that user |
country | String | false | Country of that user |
currency | String | false | Currency of that user |
gdprPolicySMS | String | false | |
gdprPolicyViber | String | false | |
gdprPolicyVoice | String | false | |
gdprPolicyWhatsApp | String | false | |
gdprPolicyFacebok | String | false | |
gdprPolicyPush | String | false |
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>
Updated 9 months ago