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 check the data against klevu nlp annotations api prepare the data object for push to klaviyo 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) example response { "apikey" "klevu 12345", "annotations" { "subjects" \[ "sneakers", "sneaker" ], "fullterm" \[ "men shoes" ] }, "responsemessage" "success", "qtime" 0 } 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 { "search term" "string", // original search query "search term(full)" \["string"], //contained in the nlp response object "subjects" \["string","string"], //contained in the nlp response object "total number of product results" integer, // total number of products found by the search query "product clicked" { // product data for clicked product }, "search results" \[ { // product data for first product in the klevu search response }, { // product data for next product in the klevu search response }, // 10 products ], "recommended results" \[] // optional list of products formated similar to // the search results, only valid in the case of // click being extracted from a fallback query } example { "search term" "men shoes", "search term(full)" \["men shoes"], "subjects" \["sneakers","sneaker"], "total number of product results" 2, "product clicked" { "name" "acme men black sneakers", 	 "id" "456789", 	 "url" "https //myexample com/products/acme men black sneakers", 	 "imageurl" "https //myexample com/images/products/456789 images medium jpg?v=1666139322", 	 "price" "26 95", 	 "saleprice" "26 95" }, "search results" \[ { 	 "name" "cool men khaki shoes", 	 "id" "987654", 	 "url" "https //myexample com/products/cool men khaki shoes", 	 "imageurl" "https //myexample com/images/products/987654 images medium jpg", 	 "price" "29 95", 	 "saleprice" "29 95" 	 }, 	 { 	 "name" "acme men black sneakers", 	 "id" "456789", 	 "url" "https //myexample com/products/skechers men black sneakers", 	 "imageurl" "https //myexample com/images/products/456789 images medium jpg", 	 "price" "26 95", 	 "saleprice" "26 95" 	 } ], } 3\ submit object to klaviyo as a klevu search event learnq push(\["track", "klevu search", \<objecttopush>]); 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 the event klevu search will now be available within the klaviyo profile > events view