Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
935 Näkymät

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
Hylkää
Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
2
jouluk. 22
5762
0
marrask. 24
1149
0
tammik. 24
6893
0
maalisk. 21
1925
3
toukok. 20
13103