How to refactor Crisp Chat integration code from MemberStack 1.0 to 2.0? Answered
Hey team can I get a little help refactoring this code for MS2.0?
<script>
MemberStack.onReady.then(function(member) {
var email = member["email"]
var name = member["name"]
if (member.loggedIn) {
try{
$crisp.push(["set", "user:email", [email] ])
$crisp.push(["set", "user:nickname", [name] ])
profitwell('start', { 'user_email': email });
} catch(e) {
}
}
})
</script>
Comments
5 comments
try this:
Thanks, Josh! I'll give it a try.
Josh Lopez Any chance you can change this to MS 2.0 code?
Hii!! We have been using Memberstack 1.0 and Crisp Chat and it worked perfect... now with 2.0 we haven't being able to integrated them... Does someone know if it is supported by 2.0? thanks!
Hi,
Can you show what errors you're presenting? or share a link to your test site to take a look at the issue? If you are using a custom code script to send the member email to the chat, you'll need to adapt it to version 2.0, because the member object has changed...
According to the docs, if you want to send a member email to the chat, you can use this snippet. If you're not sending any other member data, then crisp should work, because it would not depend on Memberstack to work
Please sign in to leave a comment.