Capturing user behavior and intent with clicks (and conversion events) should not be an afterthought. Your online success depends on your ability to track and respond to users in a direct and immediate way. Such immediacy provides invaluable insights about their intent. Save for calling and asking them, your best bet is to integrate Click Analytics into your site search analytics.
As you’ll see below, the insights obtained by site search analytics and click and conversion data form the basis for more advanced and competitive search functionalities, which work to let you utilize your search tools for fun and profit.
Bonus: Implementation is surprisingly easy: in this article we include the single line of code needed.
Site search analytics offers insights on what your users search for and the most common terms they use. But search analytics for your site tells only part of the story; it misses a huge part of the user journey.
Click Analytics picks up from there and tells you what your users do after they perform a search — whether they click or view items, and whether they convert.
Click Analytics collects detailed data about what your users view and click as they search, giving you an accurate picture of their product interests and behavior. In that regard, it is similar to Google Analytics, but its purposes also differ from those of GA.
Click Analytics is critical to improving your site search because it gives you insights about your catalog that you simply would not be able to get any other way. It generates conversion rates based on what your users purchase, add to their shopping carts, listen to, or view. Together with conversion analytics, it feeds into and makes possible ML/AI-driven functionalities such as Personalization, A/B testing, and Dynamic Re-Ranking, all enabling you to produce a competitive consumer-grade search experience on a par with those of giants like Amazon, Google, and Netflix.
With the Insights API, you get all of that with only one line of code.
Before diving into the technical details, let’s look at what Click Analytics offers. You can:
Implementing Click Analytics allows you to keep track of metrics, including the click-through rate (CTR), conversion rate, and no-click rate, all of which reveal user intent.
These metrics benchmark your current performance and help you iterate and improve upon your search solution. With a continual flow of site search analytics, plus clicks and conversions, you’ll see how these metrics can grow over time when you make changes to your relevance settings.
Dynamic Re-Ranking — a feature that adjusts the order of results based on recent clicks — is a striking example of how directly click analytics can impact your users’ Search and Discovery experiences. This feature responds to recent user behavior and pushes your best-performing items to the top of users’ results.
For example, if an item trends unexpectedly, Dynamic Re-Ranking picks up on the trend and raises the item’s position to the top. New movies and music by popular artists get automatically sent to the top as soon as they are released. Seasonal and sudden fashion trends also get a boost.
When you add user-specific information to your click and conversion events, you can leverage your analytics data to enable Personalization: a widely used feature that boosts products based on a user’s personal preferences for a specific facet or category of items. Personalization adds user-specific context to a query and makes conversion more likely.
Click-through and conversion rates per query help you target queries that aren’t performing as well as they should. With an in-depth view of your click analytics that includes click position, you can understand exactly how your users are interacting with their search results. This data, easily viewable on Algolia’s dashboard, should help you analyze specific queries and optimize relevance or create Rules to improve their performance.
Along with measuring the success of particular queries, you can change settings within the engine and measure how that impacts overall success. Algolia handles all the variant switching of an A/B test. All you have to do is set up what you want to change and for how long.
Consistently testing your relevance fine-tunes your solution’s settings and ensures an intuitive relevance and Personalization strategy.
Site search analytics and Click Analytics are not a question of cost vs. benefits. Click Analytics is free. Our Insights API exposes a simple set of methods to capture your users’ clicks; there are negligible costs in terms of time and resources. And, as you’ll see, it’s pretty straightforward to implement.
The key benefits, five of which are outlined above, are enormous, making Click Analytics a necessary part of every search solution. Getting direct and accurate feedback from your users about their behavior, interests, and expectations helps you measure the success of your search solution and improve customer retention.
It’s always useful to know ahead of time the complexity — or in this case, the simplicity — of implementing a given component.
So you’ll be glad to know that with Click Analytics, you need to take only one action: send user events to Algolia.
You can send these events:
Once you start sending these events, Algolia does the rest.
Click Analytics is about collecting key user events to build a database of user activity, and then analyzing and synthesizing that data to come up with accurate insights about user behavior, needs, and preferences.
When you have substantial traffic, in just a short amount of time, your analytics data will produce the benefits discussed earlier.
Very simply, Algolia needs the missing part of the user journey: what the user does when they get results from their search.
The first step is to tell Algolia that you’ll be sending events after users perform queries. As the screenshot below shows, Algolia returns a queryID
with every set of results, which you can use to associate the query with subsequent click events. This diagram outlines what happens when a user performs a query, views the results, clicks items, and places an item in the basket.
To easily send this information to Algolia, you have a number of options (API client or front-end libraries). The most important part is deciding which one is best for your technical stack.
Algolia has made sending events as easy as possible, and the route you choose will depend on your technical stack and exactly what you want to do.
You can decide based on whether you are using InstantSearch and whether you want to send events from the front end or the back end:
queryId
to the front end with the resultsWe recommend that you use Algolia’s InstantSearch library, letting InstantSearch manage the call to our Insights API. That said, the Insights API is built to be simple, requiring only a single call to create the click event.
So what does our Insights library look like? And how does it make implementation easier?
The standard code snippet below illustrates the code you need. It sends the following information to Algolia’s Analytics engine:
insights_library('clickedObjectIDsAfterSearch', {
userToken: 'user-123456',
eventName: 'Product Clicked',
index: 'products',
queryID: 'cba8245617aeace44',
objectIDs: ['9780545139700'],
positions: [7],
});
That’s it.
For the full code, which you can copy into your apps, check out our send click event documentation.
For those of you who love to see live coding, watch how we build an app in 5 minutes that sends Analytics events.
The general idea behind the code is to send a specific kind of event. Here, the event is a user’s click on a search result.
There are other kinds of events as well. For example, let’s add a “conversion” event to the above “click” event:
insights_library('convertedObjectIDsAfterSearch', {
userToken: 'user-123456',
index: 'products',
eventName: 'Product Wishlisted',
queryID: 'cba8245617aeace44',
objectIDs: ['9780545139700', '9780439785969']
});
This sends a wishlist conversion event. The function’s parameters indicate that the user added two objects to their wishlist (9780545139700
and 9780439785969
).
To get the full code, which you can copy into your app, check out our send conversion event documentation.
To begin with, the user searched for “harry potter”. Then did the following:
objectID
)What can you learn from this journey?
position
value that you had sent with your click event (and which is saved in the analytics database). In this example, you sent positions: [7]
, which may be too low. You can improve the position by refining and restructuring your data and/or adjusting your settings.Our docs do a great job of explaining each parameter for sending events. They also show the code snippet in 11 other languages (PHP, JavaScript, Ruby, Python, C#/.NET, Java, Swift, Android, Kotlin, Golang, and Scala).
We also have many helpful tutorials; for instance, check out our Click Analytics solution.
You now know five key reasons to implement Click Analytics. To recap, it lets you:
It’s still a bit of a novelty that a search bar could provide so many insights. Or is it? Google Analytics has been around for quit some time, helping online businesses iterate on the best formula for their success.. We’ve described how you could use Click Analytics to achieve similar insights,
Our recommendation: get your business and dev teams to work together to implement the Click Analytics Insights API.
Alexis Monks
Solutions ArchitectPeter Villani
Sr. Tech & Business WriterPowered by Algolia AI Recommendations
Nicolas Baissas
Jaden Baptista
Technical WriterBen Franz
Sales Engineering and Product Leader at AlgoliaJaden Baptista
Technical Writer