Blog

A Quick Guide to Algolia Click and Convert Events Implementation

Publish
Oct 25 2024

Transform Search Experiences with Algolia Click and Convert Events

Did you know that up to 55% of users leave a website after just one page due to poor search experiences? Algolia’s Click and Convert Events can change that by offering AI-powered insights that transform search relevance, personalization, and engagement. By tracking user interactions and conversions—such as clicks, purchases, or sign-ups—these events allow businesses to fine-tune search results and enhance customer satisfaction.

With 89% of consumers preferring personalized experiences, Click and Convert Events empower brands to deliver more accurate recommendations and optimize search performance. From A/B testing to ROI measurement, this e-book highlights how businesses are leveraging Algolia's tools to increase conversions, drive engagement, and ultimately boost revenue.

Explore how to implement Click and Convert Events and unlock the full potential of your e-commerce platform.

Implementing Algolia Click and Convert Events for E-Commerce

If you are a current customer of Algolia and you are not intimately familiar with the Algolia Analytics Dashboard, I guarantee you are leaving money on the table and customers with an experience with your brand that could be improved.

Algolia is a powerful search tool with highly advanced AI capabilities to provide customers with personalized experiences. It also provides site operators with the information they need to make decisions about the configuration, performance, and effectiveness of the platform. At the core of these powerful capabilities are Click and Convert Events which inform the AI tools and their human operators about how the platform is being used so that machines and people can make informed decisions about how to tune the discovery experience.

Related: Algolia compass workshop for click and convert events

What do Click and Convert Events power?

  1. Relevance tuning: These events allow Algolia to understand user interactions with search results. By tracking clicks, Algolia can learn which results are most relevant and adjust ranking based on actual user behavior.
  2. Personalization: Conversion events, such as purchases or sign-ups, help Algolia fine-tune personalized recommendations. This leads to more accurate and tailored search results for each user based on what actions they take after searching.
  3. Insights and analytics: Monitoring click and conversion data provides valuable insights into search performance. It shows which queries lead to engagement, and which don’t, allowing data-driven decisions for search optimization.
  4. A/B testing and search optimization: Click and conversion data are essential for running A/B tests. It helps in understanding which search configurations perform better, driving better user engagement and sales. 

    Must Read: Mastering e-commerce with customer intent data

  5. ROI measurement: By tracking conversions, you can tie search improvements directly to business outcomes, ensuring that search optimizations result in increased revenue or other key performance metrics.
  6. AI Tools: AI tools need data to make accurate predictions, and Algolia’s AI tooling is no different. The Click and Convert events power the engines that provide personalized and predictive experiences for your customers.

By implementing Click and Convert Events correctly, you can get the most out of the platform and drive increased conversions for your business.

Default Events and Event Validation

If you begin your implementation from the Algolia-provided Search UI libraries (InstantSearch), you will have inherited a few events by default. The functionality that tracks click (“Filter Applied”, “Hit Clicked”) and view (“Hits Viewed”) events are included in the library. 

View Algolia Documentation for Default Events

To enable automatic event collection, you will need to either enable collection in the Algolia Dashboard or enable the insights option in your InstantSearch code. 

View Algolia Enable Events Collection Documentation

If you are not leveraging Algolia Search UI libraries, it is up to you to implement the “search-insights” library yourself. 

View Algolia API Documentation for search-insights

Validate Events are Being Collected

Ensuring the events are correctly implemented is a multi-step process. You can validate that your events are arriving by going to the Algolia Events Hub. By clicking on the “Debugger” tab, you can view events as they are sent.

Each event in the dashboard contains details about the content of the message that is received including the validity of the data for each feature in the platform, HTTP Data, the events that have been sent for this user in a timeline view, and details about the query if the query ID is included.

In your development or test environment, navigate through the site and monitor the debugger to ensure the correct events are being sent to Algolia with the correct data.

Enable Query ID Tracking

You will also want to track the Query ID parameter as the user navigates to across the site. Without this data, Algolia cannot effectively provide usage analytics or accurately provide re-ranking, personalization, and recommendations.

One exception is for actions that are taken without a query being issued first such as a direct call to a product detail page or a static category page that is not Algolia-driven. There would be no query ID to pass in these cases, but the event should still fire and pass the unique user ID.

The HTTP client provides two different methods for events, one for actions that were performed after a query and one for events that are not associated with a query. Both events are important for analytics and Algolia functionality.

If your category listing page is driven by Algolia, you should still send the query ID for click and convert events even if the page was not rendered as the result of a keyword search.

It is recommended that you implement this tracking as a query parameter in the URL, though you can leverage cookies or local storage. If you do choose not to use a query parameter, be sure to clear the QueryID when navigating away from the Product Listing / Search Results page so that you do not attribute unrelated queries to subsequent events.

View Algolia Keeping Track of Query IDs Documentation

When products are added to the cart, you should also store the query ID in the cart so that when the user checks out you can associate that query with the purchase. This is important for tracking and attributing revenue to search queries.

View Algolia Revenue Transactions Documentation

Enable Autocomplete Events

If you have implemented Autocomplete in the search bar, you may also want to include the search events, clicks, and conversions.

Enabling events for Autocomplete is straightforward if you are using the Algolia autocomplete-js package. You can simply set the “insights” parameter to true.

Enable Events for AI Personalization

In order for the AI Personalization feature of Algolia to work optimally, you will want to enable a few more View events. You will want to enable events for:

  • Product Viewed on Category Listing Page
  • Product Viewed in Search Results
  • Product Viewed on Product Detail Page

View Algolia Personalization Configure Events Documentation

Enable Session Tracking for Personalization

To maximize the value of personalization, you should track users across sessions. The most efficient way to do this is to leverage your authentication platform or e-commerce platform to use the system-provided user token in sending events.

By default, Algolia’s libraries set a cookie in the user’s session with a generated token. By replacing this value with a token from your authentication system, you may be able to track authenticated customers across sessions and devices. Many platforms also maintain tokens for anonymous users across sessions providing better personalization for anonymous users.

View Algolia Set Up Personalization Documentation

Enable Conversion Events for E-Commerce

Next, you will want to enable conversion events. The two primary events to track are cart ads and checkout.

Add to cart events should be sent from any location that a user may add to cart. That may include the product detail page, but it is also common for cart adds to happen on the product listing page, search results, autocomplete, or any product spotlight like recommendations or home page carousels.

You will also want to be aware of any query ID that is associated with the add-to-cart action. Be sure to use the appropriate method so that the action is attributed correctly and store the query ID in the cart with the line item so that it can be attributed properly at checkout.

Must Read: Unleashing the power of data

Re-Test

After your implementation, be sure to retest all events and ensure that the correct data is arriving in Algolia. Leverage the debugger in your lower environment to ensure each action is met with the correct event and that the data sent meets your expectations.

Also, check the analytics dashboards and ensure that the data being provided matches your expectations. Leverage the Events Glossary in this document to perform a page-by-page audit of the implementation to ensure all events are in place and working as expected.

In Production

Once your implementation is in production, it will not take long for analytics data to start to appear. You can check in Data Sources -> Events Health to see if you are sending the correct data for each Algolia feature to function properly. In some cases, such as Dynamic Re-Ranking, it may take several days or weeks for the system to collect enough data for the solution to work properly.

Unlock the full potential of Algolia now!

By following this guide, you can ensure that you have correctly implemented Algolia’s Click and Convert events, and therefore you can take full advantage of the powerful analytics and AI features of the platform.

In our next guide, Icreon will explore how to maximize these capabilities and how to leverage analytics to make decisions and measure the effectiveness of your changes.

Till then, explore Icreon’s Ecommerce Services to know our offerings in context with your business requirements.