Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to set user attributes #48

Closed
josiahwiebe opened this issue Mar 2, 2021 · 3 comments
Closed

Ability to set user attributes #48

josiahwiebe opened this issue Mar 2, 2021 · 3 comments

Comments

@josiahwiebe
Copy link

Using Intercom, you're able to set user data when registering the chat loader. For example:

window.Intercom('boot', {
app_id: 'app_id_here',
...(user && {
  name: `${user.name.first} ${user.name.last}`,
  email: user.email,
  user_id: user.id,
  created_at: user.created_at,
}),

Is there any way to do this with this loader currently?

@benschwarz
Copy link
Member

Hey @josiahwiebe 👋

You can achieve this by using window.intercomSettings (See docs here).

Bear in mind that any window.intercomSettings Messenger Attributes won't be applied to react-live-chat-loader.

Hope that helps! Let me know if that's not quite what you're after.

@josiahwiebe
Copy link
Author

Yep, I ended up using window.Intercom in a useEffect hook. Thanks for this great library!

@benschwarz
Copy link
Member

Great, glad it worked out.

Tell your friends 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants