36

Image

By aneta.koreba

Jan. 10, 2019, 9:58 p.m.

I'm having problems with Custom Script Integration for logged in users

I've checked this page:

https://user.com/en/integrations/custom-script/

but I'm not sure how can I set up the attributes of user's that are logged in?


Answers 2

0
alinashafikova

to aneta.koreba

Jan. 11, 2019, 11:08 a.m.

When you put the code on your website it should look like that:

<scriptdata-cfasync="false"type="text/javascript">
  window.civchat = {
    apiKey: 'YOUR_API_KEY',
    name: "",
    user_id: "",
    email: "",
  };
</script><scriptdata-cfasync="false"type="text/javascript"src="https://widget.userengage.com/widget.js"></script>


0
aneta.koreba

to aneta.koreba

Jan. 10, 2019, 10:35 p.m.

The code you implemented for logged in users should look like:

user_id : '{{dynamic variable with user id}}'

email: '{{dynamic variable with email address}}'

{{ }} - these are references to values, which are already in your data_layers. They relate to what is on your page.