Passing through logged in member email to identify user in chat widget

I am looking to integrate Crisp chat with my Ghost blog. I am looking to embed my chat widget into member’s only help/welcome/contact pages.

How can I pass through the logged-in member’s email to Crisp chat so that when someone opens a conversation inside the widget, I will already have their user info as well as saved history of all previous conversations.

I am not code savvy but I have successfully done this integration in in the past here’s what original thread looks like;

Here is what the code snippet looks like;

if(window.logged_in_user && window.logged_in_user['softr_user_email']) {
$crisp.push(["set", "user:email", window.logged_in_user['softr_user_email']]);

I am thinking it’s possible to do the same using Ghost member attributes but I wouldn’t know how to script it.

Here is some more documentation from Crisp chat;

I appreciate your time and help with this as it is a game changer for me but is also a replicable solution/idea others can copy & paste.

Following documentation to the best of my ability, I get;

$crisp.push(["set", "user:email", [{{}}]])

Shown here, Crisp automatically recognizes an input but says the value it received isn’t an email address. Citing “Mistyped” error.

I think you likely need to put quotes around the email, does this work?

$crisp.push(["set", "user:email", ["{{}}"]])