Olark Destination

Segment makes it easy to send your data to Olark (and lots of other destinations). Once you've tracked your data through our open source libraries we'll translate and route your data to Olark in the format they understand. Learn more about how to use Olark with Segment.

Getting Started

When you toggle on Olark in Segment, this is what happens:

  • Our CDN is updated within 5-10 minutes. Then our snippet will start asynchronously loading Olark’s loader0.js onto your page. This means you should remove Olark’s snippet from your page.
  • Olark’s chat box will appear on your page, as configured in your Olark account, and you can start chatting with visitors.

Olark is only supported on the client side.


Page

When you call page, we call Olark’s sendNotificationToOperator function as looking at *url*. You must enable this option with the pageview flag, because it can sometimes be bothersome.

Identify

When you call identify on analytics.js, we send the following data to Olark:

  • We call api.chat.updateVisitorNickname with traits.name and traits.email, or just their traits.name or just their traits.email or their userId. In that order of preference.
  • We call api.visitor.updateEmailAddress with traits.email if you send it, or userId if that’s an email.
  • We call api.visitor.updateFullName with traits.name if you send it, or traits.firstName and traits.lastName appended with a space in between, if you send both first and last name.
  • We call api.visitor.updatePhoneNumber with traits.phone if you send it.
  • We call api.visitor.updateCustomFields with traits.

More documentation on the Olark API can be found in Olark’s docs.

Track

When you call track or one of its helpers on analytics.js, we call Olark’s sendNotificationToOperator function as visitor triggered *eventName*. You must enable this option with the track flag, because it can sometimes be bothersome.


Features

Customizing the chat box

All the settings you can change from your Olark settings pages, like targeted chat and your chat box design, still work exactly the same when Olark is enabled via Segment.

Olark Javascript API

If you’d like to use the native Olark Javascript functions after turning on Olark via Segment our ready function will allow you to do that. Since we still load the Olark library in the background you can access those functions like this:

analytics.ready(function(){
  olark('api.box.shrink')
});

Read the ready docs for more details


Record Live Chat Events

Using Olark through Segment gives you the ability to automatically record track events for live chat conversations. If you select this option, we’ll collect the following events:

  • Live Chat Conversation Started
  • Live Chat Message Sent
  • Live Chat Message Received

These events will be sent to other tools in your stack that can accept track calls, so you can do things like analyze if users who chat spend more money over time.

To learn more about the live chat events you can capture with this destination, head on over to our Live Chat spec docs.

Turn on Olark


Supported Sources and Connection Modes

WebMobileServer
📱 Device-based
☁️ Cloud-based

To learn more about about Connection Modes and what dictates which we support, see here.

Settings

Segment lets you change these destination settings via your Segment dashboard without having to touch any code.

Log custom events from analytics.track() to the Olark chat console

Log custom events from analytics.track() to the Olark chat console

Group ID

If you want to use Olark across multiple different websites under the same account, create an Olark Group and add the ID here.

Show the user's name or email chat console

Show the user’s name or email from analytics.identify() in the Olark chat console

Use inline chat box

Configures whether the chat box should be inlined or not

Record live chat events.

Automatically send Live Chat message events, conversation starts and ends to other tools you have enabled.

Log pageviews to the Olark chat console

Log pageviews to the Olark chat console

Site ID

You can find your Site ID on the Olark Install page. It should look something like this: 9385-174-10-1457.


If you have any questions or see anywhere we can improve our documentation, please let us know or kick off a conversation in the Segment Community!