Search by Algolia
Introducing new developer-friendly pricing
algolia

Introducing new developer-friendly pricing

Hey there, developers! At Algolia, we believe everyone should have the opportunity to bring a best-in-class search experience ...

Nick Vlku

VP of Product Growth

What is online visual merchandising?
e-commerce

What is online visual merchandising?

Eye-catching mannequins. Bright, colorful signage. Soothing interior design. Exquisite product displays. In short, amazing store merchandising. For shoppers in ...

Catherine Dee

Search and Discovery writer

Introducing the new Algolia no-code data connector platform
engineering

Introducing the new Algolia no-code data connector platform

Ingesting data should be easy, but all too often, it can be anything but. Data can come in many different ...

Keshia Rose

Staff Product Manager, Data Connectivity

Customer-centric site search trends
e-commerce

Customer-centric site search trends

Everyday there are new messages in the market about what technology to buy, how to position your company against the ...

Piyush Patel

Chief Strategic Business Development Officer

What is online retail merchandising? An introduction
e-commerce

What is online retail merchandising? An introduction

Done any shopping on an ecommerce website lately? If so, you know a smooth online shopper experience is not optional ...

Vincent Caruana

Sr. SEO Web Digital Marketing Manager

5 considerations for Black Friday 2023 readiness
e-commerce

5 considerations for Black Friday 2023 readiness

It’s hard to imagine having to think about Black Friday less than 4 months out from the previous one ...

Piyush Patel

Chief Strategic Business Development Officer

How to increase your sales and ROI with optimized ecommerce merchandising
e-commerce

How to increase your sales and ROI with optimized ecommerce merchandising

What happens if an online shopper arrives on your ecommerce site and: Your navigation provides no obvious or helpful direction ...

Catherine Dee

Search and Discovery writer

Mobile search UX best practices, part 3: Optimizing display of search results
ux

Mobile search UX best practices, part 3: Optimizing display of search results

In part 1 of this blog-post series, we looked at app interface design obstacles in the mobile search experience ...

Vincent Caruana

Sr. SEO Web Digital Marketing Manager

Mobile search UX best practices, part 2: Streamlining search functionality
ux

Mobile search UX best practices, part 2: Streamlining search functionality

In part 1 of this series on mobile UX design, we talked about how designing a successful search user experience ...

Vincent Caruana

Sr. SEO Web Digital Marketing Manager

Mobile search UX best practices, part 1: Understanding the challenges
ux

Mobile search UX best practices, part 1: Understanding the challenges

Welcome to our three-part series on creating winning search UX design for your mobile app! This post identifies developer ...

Vincent Caruana

Sr. SEO Web Digital Marketing Manager

Teaching English with Zapier and Algolia
engineering

Teaching English with Zapier and Algolia

National No Code Day falls on March 11th in the United States to encourage more people to build things online ...

Alita Leite da Silva

How AI search enables ecommerce companies to boost revenue and cut costs
ai

How AI search enables ecommerce companies to boost revenue and cut costs

Consulting powerhouse McKinsey is bullish on AI. Their forecasting estimates that AI could add around 16 percent to global GDP ...

Michelle Adams

Chief Revenue Officer at Algolia

What is digital product merchandising?
e-commerce

What is digital product merchandising?

How do you sell a product when your customers can’t assess it in person: pick it up, feel what ...

Catherine Dee

Search and Discovery writer

Scaling marketplace search with AI
ai

Scaling marketplace search with AI

It is clear that for online businesses and especially for Marketplaces, content discovery can be especially challenging due to the ...

Bharat Guruprakash

Chief Product Officer

The changing face of digital merchandising
e-commerce

The changing face of digital merchandising

This 2-part feature dives into the transformational journey made by digital merchandising to drive positive ecommerce experiences. Part 1 ...

Reshma Iyer

Director of Product Marketing, Ecommerce

What’s a convolutional neural network and how is it used for image recognition in search?
ai

What’s a convolutional neural network and how is it used for image recognition in search?

A social media user is shown snapshots of people he may know based on face-recognition technology and asked if ...

Catherine Dee

Search and Discovery writer

What’s organizational knowledge and how can you make it accessible to the right people?
product

What’s organizational knowledge and how can you make it accessible to the right people?

How’s your company’s organizational knowledge holding up? In other words, if an employee were to leave, would they ...

Catherine Dee

Search and Discovery writer

Adding trending recommendations to your existing e-commerce store
engineering

Adding trending recommendations to your existing e-commerce store

Recommendations can make or break an online shopping experience. In a world full of endless choices and infinite scrolling, recommendations ...

Ashley Huynh

Looking for something?

5 reasons to add clicks to site search analytics (and code to do it)

Apr 24th 2021 product

5 reasons to add clicks to site search analytics (and code to do it)
facebookfacebooklinkedinlinkedintwittertwittermailmail

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, Click Analytics, and the Insights API: Why you should read this article

  • Learn the difference between site search analytics and Click Analytics
  • Understand the necessity of Click Analytics for dynamic relevance, A/B testing, recommendations, and Personalization
  • See how easy it is to implement Click Analytics using our Insights API

Comparing site search analytics with Click Analytics

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.

What is Click Analytics?

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.

Top 5 reasons to add Click Analytics to your site search analytics

Before diving into the technical details, let’s look at what Click Analytics offers. You can:

1. View trends over time

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.

  • A high click-through rate means a high percentage of searches in which an item has been clicked. It indicates customer engagement. 

 

  • A high conversion rate means a high percentage of searches in which an item has been converted. It shows that users can find what they’re looking for and that they want to convert. 

 

  • A high no-click rate means a high percentage of queries that generate no clicks. It indicates that items may no longer be trending or are getting less traction in the market.

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. 

2. Incorporate the “wisdom of the crowd” (with a little AI help)

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.

3. Enable a personalized search experience

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.

4. Improve search results and locate problem queries

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.

5. Test how users interact with optimizations

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.

Click Analytics and the Insights API: free to use, costly not to use

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.

How to Implement Click Analytics using the Insights API [Technical 🤓]

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:

  • Clicks 
  • Conversions
  • Facet selections
  • Page or product views 

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. 

How do you send events? A quick overview of our Insights API

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.

Which library or API do you use to send events?

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:  

  1. You’re using InstantSearch on your front end
    • New! Use the Insights middleware for events (requires InstantSearch.js v4.8.3) on the search results page
    • Use the Insights client library for events and any other page that requires events, such as a checkout or wishlist pag,
    • Note: We have versions of InstantSearch for vanilla JavaScript, React, Angular, Vue, iOS, and Android.
  2. You’re not using InstantSearch on your front end, but you want to send events from the front end.
  3. You’re not using InstantSearch, you have a back-end implementation, and you want to send events from the front end
  4. You’re not using InstantSearch, you have a back-end implementation, and you want to send events from the back end

We 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.

Ok, let’s see the code (one-minute read)

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:

  • User’s token
  • Query ID
  • Object ID for the item clicked
  • The item’s position in the results
  • Type of event (click, conversion, view)

This is the code to send a click event:

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.

What does this code do?

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.

What do these events tell us about the user’s journey and buying preferences?

To begin with, the user searched for “harry potter”. Then did the following:

  • Clicked a result (let’s say “Harry Potter, Book 1,” indicated by its objectID)
  • Converted “Harry Potter, Book 1” by adding it to their wishlist 
  • Converted another book (“Harry Potter, Book 2”)

What can you learn from this journey? 

  • This user shows an affinity for children’s items and maybe also adventure or fantasy books. You can use this information to personalize their results.
  • If many users do this same thing, then Harry Potter books should appear higher in the results. If this is a trend, and you’ve enabled dynamic-ranking, then the search engine will do this automatically. Otherwise, you can improve the 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.

Further reading

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.

What’s next 

You now know five key reasons to implement Click Analytics. To recap, it lets you:

  • Detect patterns of click and conversion behavior, which you can then use to configure your settings and reorder results
  • Detect recent buying trends, which the search engine can use to push the best-performing items to the top of search results — dynamically and immediately
  • Capture every user’s unique search and click activity to personalize their results for a particular set of facets or category of items
  • Detect and help resolve inefficient search experiences
  • Test search settings using A/B testing 

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.

About the authors
Alexis Monks

Solutions Architect

Peter Villani

Sr. Tech & Business Writer

linkedinmediumtwitter

Recommended Articles

Powered byAlgolia Algolia Recommend

Search Analytics: Gain Insights from User Search Data
product

Nicolas Baissas

Why you should capture click and conversion events from day one
engineering

Jaden Baptista

Technical Writer

How leveraging search analytics can boost user engagement and ROI
ux

Catherine Dee

Search and Discovery writer