Olark Live Chat

Integrate with your Olark Live Chat

If you use Olark Live chat on your website, you can track the visitors who start a new chat in your Ruler dashboard as a form completion, allowing you to attribute the user to the source of their visit.

Step One - Add the Ruler Visitor to your Olark Live Chat

Add the following JavaScript into the footer of your website

<script>
    function rulerIdToOlark() {
        try {
            if(RulerAnalyticsVisitorId){
                olark('api.chat.onReady', function(e){ 
                    olark('api.visitor.updateCustomFields', {
                        rulerId: RulerAnalyticsVisitorId
                    });
                });
            }else{
                console.log("Ruler Analytics ID does not exist");
            }
        } catch (error) {
            setTimeout(function(){ 
            	rulerIdToOlark() 
            },500);
        }
    }

    rulerIdToOlark();
</script>

Once this is set up on your website, if the function is working you should be able to see a variable called 'Ruler ID' in the details of your new chats.

Step Two - Fire the new chats using Olark Webhooks

Once the ID is in your Live Chat tool, you will need to send the new event as a Webhook to your Ruler Live Chat Webhook. Please ask your Account manager for this during set up.

See Olarks guide on sending Webhooks here.

Url - Should be the Webhook endpoint provided to you by Ruler Analytics.

Enable 'send all transcripts'

Any questions, please contact [email protected]