The pre-chat survey allows you to ask visitors for their name, email or phone number before starting a chat. You can enable and modify the survey in the Behavior and Text settings.

pre-chat survey

This is a great tool to gather information about your visitors before they start chatting. You can modify the settings so that the pre-chat survey is completely optional, required or only require certain fields such as email.

Enable the pre-chat survey on only one page

If you’d like to only use the pre-chat survey on only specific pages of your website, you can do so by using the Olark API.

To add the pre-chat survey to a page modify the Olark snippet on that page with the following:

/* custom configuration goes here ( */
olark.configure("features.prechat_survey", true);
olark.configure('system.ask_for_name', 'required');
olark.configure('system.ask_for_email', 'optional');
olark.configure('system.ask_for_phone', 'hidden');

This will enable a pre-chat survey that requires a name, shows an email field which can be left blank by the visitor, and hides the phone number field.

To disable the pre-chat survey on a page, you can set it to false:

olark.configure("features.prechat_survey", false);