When you need to integrate Koala with your server-side application.
User-Agent
header in your requests to Koala, or it may be flagged as a bot and not processed.
/batch
endpoint has a few constraints/requirements:profile_id
or email
identifier as top-level properties in the request bodyprofile_id
/email
)identify
calls and see them appear in the debugger in the Koala app, you’ll need to include the identifies
array in the body of the request. See an example below.profile_id
by respecting one if it’s already there, or setting it yourself if it isn’t there. You can read and modify the ko_id
cookie value in the request to do this.
Note: when setting your own randomly generated profile_id
, you should use a UUID v4 format.
Here’s an example of parsing the Koala cookie for a profile_id
using Express in Node.js:
/batch
endpoint for your workspace.
The API call must include either an email
(most common scenario), or a profile_id
(read from the Koala cookie).
message_id
if you do not require it, but note that the event could potentially be captured more than once (if retries are needed). The message_id
acts as an idempotency key to dedupe replayed/retried events.
/batch
endpoint for your workspace.
profile_id
or email
key in the body of a request in order for it to be attached to an existing visitor in Koala.profile_id
for a visitor by reading the ko_id
cookie that is set by the Koala pixel client side.email
field to your /batch
call, and Koala will associate the traits to an existing user that has been previously identified using the same email.domain
along with the traits for the Account.
Account traits will be associated with the domain
and will be available to all visitors that have been identified with the same account.
You should use the /accounts/batch
endpoint for your workspace to send Account traits:
getkoala.com
in the Koala app.
account_id
or domain
key in the body of a request in order for it to be attached to an existing Account in Koala.
We recommend using the domain
parameter to associate traits with an account.domain
hasn’t been tracked in Koala yet.group_id
parameter alongside your Account Traits, that way, Koala can disambiguate multiple groupings within the same company.
group_id
parameter is optional, and you can use it to disambiguate multiple groupings within the same company.group_id
and display them in the Account page in Koala under each individual grouping.account_id
or domain
to identify the account. These events work similarly to profile-level events but are associated with the entire account rather than individual users.
You should use the /accounts/batch
endpoint for your workspace to send Account events: