Sajari is now Search.io! Learn about our new name and product announcement here.

Read more

How do I integrate custom analytics with my search interface?

If you've created a search interface from the Sajari Console, you can trigger your own analytics on searches by subscribing to events from the search interface in javascript.

Instructions

If you've created a search interface from the Sajari Console, you can trigger your own analytics on searches by subscribing to events from the search interface in javascript.

Interfaces are created using setup which is included when generating the interface from the Console.

You can subscribe to events by calling your interface with the "sub" value followed by the pipeline (either pipeline or instantPipeline) and event name, then a callback. It takes the form:


For example, if you are using the default inline interface and want to listen to the search-sent event, you would write:


For information on the events please refer to Website Search Integration documentation on Github.


We’re in the business of improving your business.
Get started today.