Access your Activa Live Chat account here »

Activa Live Chat Features

contact us Contact Us by E-mail

call us 888–4–CHAT–44
(888–424–2844)

Free Trial

Get full access to Activa Live Chat for 14-days with a trial sign up.

Professional Services

Inquire about Activa Live Chat's professional services for your custom needs.

Force start a live chat automatically

Activa Live Chat Support » Customization » How To

Article ID: 42 | Last Modified: 04/01/2008

You can start a live chat instantly and automatically when a visitor comes to your Website (or any page within that Website) using some simple JavaScript.

NOTE 1: This technique requires a Deployment that uses a Framed live chat window. Pop-Up live chat windows "will" get blocked by all modern browsers.

NOTE 2: This technique will "not" work on pages within SSL (secure socket layer).

The following example illustrates how to start a live chat upon page load, and set a session cookie for the domain to prevent it from relaunching when the visitor ends the chat (since the live chat window is framed, when the chat ends, the page will reload).

  1. Place this JavaScript between your head tags.

    <script type="text/javascript">

    function requestChat() {
    var __ALC_CHAT_REQUESTED = ALCGetCookie('ALC_CHAT_REQUESTED');

    if ( !__ALC_CHAT_REQUESTED ) {
       ALCSetCookie('ALC_CHAT_REQUESTED', 'true');
       ALCStartChat();
    }
    }

    </script>

  2. Add "requestChat();" to your body onload.

    <body onLoad="requestChat();">