Skip to content

Instantly share code, notes, and snippets.

@marinhero
Created May 20, 2019 20:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marinhero/4ba1db40e4c419013c0df3edbaaa8c07 to your computer and use it in GitHub Desktop.
Save marinhero/4ba1db40e4c419013c0df3edbaaa8c07 to your computer and use it in GitHub Desktop.
Do not survey certain domains
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="https://cdn.wootric.com/wootric-sdk.js"></script>
<script type="text/javascript">
var user_email = user.email; // Mocking a backend object
var blackListedDomain = 'wootric.com';
if (user_email.indexOf(blackListedDomain) != -1) {
window.wootricSettings = {
email:'nps@example.com',// TODO: Required to uniquely identify a user. Email is recommended but this can be any unique identifier.
created_at: 1234567890, // TODO: The current logged in user's sign-up date as a Unix timestamp.
account_token: 'NPS-xxxxxxx'
};
window.wootric('run');
}
</script>
</head>
<body>
<h1>Demo</h1>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment