JavaScript SDK
Identify visitors

Koala allows you to identify your visitors with their email. This enables Koala to associate the visitor with a specific company, track them on different platforms, and connect events from before and after they log in.

Identifying visitors can be done with the identify method in Koala’s JavaScript SDK. By using this method, you can enhance your ability to understand visitor and company intent throughout Koala.

Anonymous visitors

Every visitor to your website is automatically assigned a unique anonymous ID by the Koala JavaScript SDK. You can use the identify method to provide additional properties about the visitor even before you know their email address. This information can help you better understand traits about your visitors.

In order to track visitors across different devices, use the identify method to associate events with a logged-in user instead of just the device they are using.

Identifying a visitor

When a visitor signs up for your product for the first time, or logs in again, you can use the identify method to associate their email address with their anonymous ID. This allows Koala to associate events from before and after they log in and Koala can associate the visitor with a specific company.

You should use the identify method whenever a visitor:

  • Signs up for your product
  • Logs in
  • Provides their email address in a form
  • Loads a page as a logged-in user
ko.identify('[email protected]')

You can also provide additional properties about the visitor when you identify them. This information can help you better understand traits about your visitors.

ko.identify('[email protected]', {
  name: 'Jane Doe',
  plan: 'Team Plan',
  logins: 5
})

Setting visitor properties

You can use the properties (2nd argument) to supply additional details about the anonymous or known visitor. This can include any relevant information that helps you understand your visitors better. Some examples of visitor properties are:

  • name: The visitor’s full name
  • title: The visitor’s job title
  • role: The visitor’s role
  • and whatever else is important to your business

Here is an example of using the identify method to set visitor properties:

ko.identify('[email protected]', {
  name: 'Jane Doe',
  title: 'Product Manager'
})