Guide
Connectors

Klaviyo : Search Events

8min

The following guide is for integrating Klevu search events into Klaviyos event tracking using API.

To implement the connector to Klaviyo, you need an active subscription to Klaviyo and be on a Klevu plan with Personalization enabled.



For details on the setup and configuration of Klevu to Klaviyo events within the platform(s), please see: https://help.klevu.com/support/solutions/articles/5000878078-integration-steps-to-send-klevu-search-events-to-klaviyo

You must have Klaviyo active on the site to utilize Klaviyo's API for pushing event data.



There are three key aspects to consider:

  1. Check the data against Klevu NLP Annotations API
  2. Prepare the data object for push to Klaviyo
  3. Submit object to Klaviyo as a Klevu Search event

1. Check the data against Klevu NLP Annotations API

Klevu provides an external function for Klaviyo event tracking that will analyze and prepare the values to be sent to Klaviyo. Although not required, this step is recommended to get the optimal values that will be injected into the Klaviyo event flow. This check may be fired after a search query and held in localstorage for use in constructing the object for the Klaviyo event push (see step 2 below)

GET
Request
Query Parameters
query
optional
String
The search query term as entered by the end-user
title
optional
String
The name of the product that has been clicked (or otherwise given context)
category
optional
String
The category of the product that has been clicked (or otherwise given context)
language
optional
String
The store ISO language code
Query Parameters
Responses
200
404


Example Response

JSON




2. Prepare the data object for push to Klaviyo

The values returned by the Klevu Annotations query will be used in the object sent to Klaviyo for use in the event flow. Product Clicked tracking and Search Results data will need to be captured independently for use in the object. Build the object to push to Klaviyo using the following JSON format:

JSON


Example:

JSON




3. Submit object to Klaviyo as a Klevu Search event

JS


See Klaviyo developer documentation for details on submitting tracked events. https://developers.klaviyo.com/en/v1-2/docs/javascript-api

The event Klevu Search will now be available within the Klaviyo Profile > Events view

Klaviyo Profile > Events
Klaviyo Profile > Events