Skip to Content
Menu
This question has been flagged

Hi, so I am installing Intercom chat on my site and I want it to know when a user is logged in so it saves things ot their accounts and things like that. I use Odoo online so I cant add any backend JS, so using the Custom HTML/CSS/JS feature on the frontend, how can I prefill the Intercom tag to have the user info? I see all these responses saying do require(session.web), but I cant do require, as i use Odoo online and can only add to the frontend Custom HTML.

<script>
  window.intercomSettings = {
    user_id: user.id, // IMPORTANT: Replace "user.id" with the variable you use to capture the user's ID
    name: user.name, // IMPORTANT: Replace "user.name" with the variable you use to capture the user's name
    email: user.email, // IMPORTANT: Replace "user.email" with the variable you use to capture the user's email address
    created_at: user.createdAt, // IMPORTANT: Replace "user.createdAt" with the variable you use to capture the user's sign-up date
  };
</script>

It would be amazing if someone can please tell me how to do this.

Thank you!

Avatar
Discard
Related Posts Replies Views Activity
2
Dec 22
5168
0
Nov 24
655
0
Jan 24
6396
0
Mar 21
1640
3
May 20
13103