General > Support

Configuration Visitor name

(1/1)

Infoserv:
Hello,

I need some help to configure the "visitor name"
 for it to be pre-registered at customer connexion.

thank you for you help

faf:
What exactly are you trying to do?

Don't hesitate to provide maximum details. Only that way one could be able to understand your question.

stryker1:
I guess he also wants the same as I:
I want to integrate Mibew in an existing web application where the user is logged in, so I already know is name.

I want to directly start the chat, without the first step that the user has to enter his name (again).

Is there a way to start the chat without asking for the username, or even better: start the chat with the name of the user? Maybe include the name as parameter in the event the chat button fires when opening the Mibew chat window?

faf:

--- Quote from: stryker1 on October 13, 2018, 01:51:26 PM ---I guess he also wants the same as I:

--- End quote ---

Could you borrow me your crystal ball? Mine seems broken.  ;D


--- Quote from: stryker1 on October 13, 2018, 01:51:26 PM ---I want to integrate Mibew in an existing web application where the user is logged in, so I already know is name.

I want to directly start the chat, without the first step that the user has to enter his name (again).

Is there a way to start the chat without asking for the username, or even better: start the chat with the name of the user? Maybe include the name as parameter in the event the chat button fires when opening the Mibew chat window?

--- End quote ---

You can start the chat without asking for anything. Just disable the option "Pre-chat survey".

As of predefined visitor name, there are two possible ways:

1. The right (and complicated) one is to create a plugin that will make use of \Mibew\EventDispatcher\Events::VISITOR_TRACK and \Mibew\EventDispatcher\Events::THREAD_CREATE events. See docs here and here for more details.

 2. The tricky (and not recommended) one is to manually alter the code of the button.

 One have to replace:


--- Code: ---Mibew.ChatPopup.init({"id":"<some unique id>","url":"\/mibew\/chat?locale=en"
--- End code ---

with


--- Code: ---Mibew.ChatPopup.init({"id":"<some unique id>","url":"\/mibew\/chat?locale=en&name=<the desired visitor name>"
--- End code ---

In that case the default name in the form will be equal to the desired value. But it's a kind of hack, so use at your own risk.

stryker1:

--- Quote --- 2. The tricky (and not recommended) one is to manually alter the code of the button.
--- End quote ---
This is working great :) Thank you!

Navigation

[0] Message Index

Go to full version