Guide
Features
Analytics
5 min
events can be sent to the analytics endpoint ( https //stats ksearchnet com/analytics/collect https //stats ksearchnet com/analytics/collect ) in order to record analytics data for use in conversion tracking using the analytics\collectservice data is sent as a collection of event objects (within an eventiterator) while multiple events can be sent in a single request, each individual event must be associated with a single event action (such as order purchase), klevu account, and user profile (eg, customer details) note only purchase events are currently available to send via the php sdk data contained within an event includes true false 155false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type event data for order purchase the data for events of type order purchase is an object with a single items key the data items property comprises an array of objects for each line item, with the following information true false 193false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type for more information, please see the storefront apis documentation sending data to older producttracking endpoints (eg https //stats ksearchnet com/analytics/producttracking https //stats ksearchnet com/analytics/producttracking ) is not supported in the php sdk validation and exception handling prior to transmitting data, each individual event is validated; any invalid records will throw a validationexception , preventing transmission of all events validation is performed on both the event properties, and the event data event data validation will differ depending on the event type and version request exceptions, or responses identifying an invalid request throw a badrequestexception client or network exceptions, responses with unexpected status codes, or responses with a missing or invalid body content throw a badresponseexception logging request headers and body are logged prior to send at debug level response headers, body, and execution time are logged on successful request send at debug level more information and code samples can be found under send analytics events data