Skip to content

Instantly share code, notes, and snippets.

@looneym
Last active January 9, 2017 17:50
Show Gist options
  • Save looneym/211772e8371e1c68e1522e1ec868d1eb to your computer and use it in GitHub Desktop.
Save looneym/211772e8371e1c68e1522e1ec868d1eb to your computer and use it in GitHub Desktop.
Conditionally populate intercomSettings object with user data if user is logged in
if (CurrentUser.loggedIn)){
window.intercomSettings = {
app_id: APP_ID,
name: CurrentUser.Name,
email: CurrentUser.Email,
user_id: CurrentUser.userID,
};
} else {
window.intercomSettings = {
app_id: APP_ID,
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment