Search by Algolia
Easily integrate Algolia into native apps with FlutterFlow
engineering

Easily integrate Algolia into native apps with FlutterFlow

Algolia's advanced search capabilities pair seamlessly with iOS or Android Apps when using FlutterFlow. App development and search design ...

Chuck Meyer

Sr. Developer Relations Engineer

Algolia's search propels 1,000s of retailers to Black Friday success
e-commerce

Algolia's search propels 1,000s of retailers to Black Friday success

In the midst of the Black Friday shopping frenzy, Algolia soared to new heights, setting new records and delivering an ...

Bernadette Nixon

Chief Executive Officer and Board Member at Algolia

Generative AI’s impact on the ecommerce industry
ai

Generative AI’s impact on the ecommerce industry

When was your last online shopping trip, and how did it go? For consumers, it’s becoming arguably tougher to ...

Vincent Caruana

Senior Digital Marketing Manager, SEO

What’s the average ecommerce conversion rate and how does yours compare?
e-commerce

What’s the average ecommerce conversion rate and how does yours compare?

Have you put your blood, sweat, and tears into perfecting your online store, only to see your conversion rates stuck ...

Vincent Caruana

Senior Digital Marketing Manager, SEO

What are AI chatbots, how do they work, and how have they impacted ecommerce?
ai

What are AI chatbots, how do they work, and how have they impacted ecommerce?

“Hello, how can I help you today?”  This has to be the most tired, but nevertheless tried-and-true ...

Catherine Dee

Search and Discovery writer

Algolia named a leader in IDC MarketScape
algolia

Algolia named a leader in IDC MarketScape

We are proud to announce that Algolia was named a leader in the IDC Marketscape in the Worldwide General-Purpose ...

John Stewart

VP Corporate Marketing

Mastering the channel shift: How leading distributors provide excellent online buying experiences
e-commerce

Mastering the channel shift: How leading distributors provide excellent online buying experiences

Twice a year, B2B Online brings together America’s leading manufacturers and distributors to uncover learnings and industry trends. This ...

Jack Moberger

Director, Sales Enablement & B2B Practice Leader

Large language models (LLMs) vs generative AI: what’s the difference?
ai

Large language models (LLMs) vs generative AI: what’s the difference?

Generative AI and large language models (LLMs). These two cutting-edge AI technologies sound like totally different, incomparable things. One ...

Catherine Dee

Search and Discovery writer

What is generative AI and how does it work?
ai

What is generative AI and how does it work?

ChatGPT, Bing, Bard, YouChat, DALL-E, Jasper…chances are good you’re leveraging some version of generative artificial intelligence on ...

Catherine Dee

Search and Discovery writer

Feature Spotlight: Query Suggestions
product

Feature Spotlight: Query Suggestions

Your users are spoiled. They’re used to Google’s refined and convenient search interface, so they have high expectations ...

Jaden Baptista

Technical Writer

What does it take to build and train a large language model? An introduction
ai

What does it take to build and train a large language model? An introduction

Imagine if, as your final exam for a computer science class, you had to create a real-world large language ...

Vincent Caruana

Sr. SEO Web Digital Marketing Manager

The pros and cons of AI language models
ai

The pros and cons of AI language models

What do you think of the OpenAI ChatGPT app and AI language models? There’s lots going on: GPT-3 ...

Catherine Dee

Search and Discovery writer

How AI is transforming merchandising from reactive to proactive
e-commerce

How AI is transforming merchandising from reactive to proactive

In the fast-paced and dynamic realm of digital merchandising, being reactive to customer trends has been the norm. In ...

Lorna Rivera

Staff User Researcher

Top examples of some of the best large language models out there
ai

Top examples of some of the best large language models out there

You’re at a dinner party when the conversation takes a computer-science-y turn. Have you tried ChatGPT? What ...

Vincent Caruana

Sr. SEO Web Digital Marketing Manager

What are large language models?
ai

What are large language models?

It’s the era of Big Data, and super-sized language models are the latest stars. When it comes to ...

Catherine Dee

Search and Discovery writer

Mobile search done right: Common pitfalls and best practices
ux

Mobile search done right: Common pitfalls and best practices

Did you know that 86% of the global population uses a smartphone? The 7 billion devices connected to the Internet ...

Alexandre Collin

Staff SME Business & Optimization - UI/UX

Cloud Native meetup: Observability & Sustainability
engineering

Cloud Native meetup: Observability & Sustainability

The Cloud Native Foundation is known for being the organization behind Kubernetes and many other Cloud Native tools. To foster ...

Tim Carry

Algolia DocSearch is now free for all docs sites
product

Algolia DocSearch is now free for all docs sites

TL;DR Revamp your technical documentation search experience with DocSearch! Previously only available to open-source projects, we're excited ...

Shane Afsar

Senior Engineering Manager

Looking for something?

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