Guide

Analytics Tracking

3min

Overview

Reporting user interaction with Klevu is crucial to allow the machine learning algorithms to accurately rank items.

Analytics should be considered a required component of implementation. 

There are three key aspects of analytic reporting:

  1. Searches : the primary source of learning, and is where we ascertain the most meaningful and useful customer interactions.
  2. Clicks : a machine learning data point measuring engagement.
  3. Purchases : are a critical data point for attributing conversion.

These learnings are applied to all three of our core products: Search, Category Merchandising and Recommendations. Including all enabled banners and facets.

In most of the analytic calls, the shopper's IP address is used by the machine learning to attribute a single shopper's searches and clicks into conversions.

Please note: If the klevu_shopperIP parameter is left empty, Klevu will attempt to retrieve the IP value from the header of the request itself. As best practice, when possible, you should identify the IP value prior to the analytics call and consider it as a required parameter.

Analytics URL

The endpoint urls are based on your assigned Analytics URL. You can find this value within your Klevu Merchant Center dashboard.

Klevu Merchant Center > Store Settings > Analytics URL

You will see this represented in the documentation as placeholder {{ Analytics_URL }}

Request Headers

When proxying analytics calls to our system, ensure that all common request headers, including the original User-Agent, are passed through correctly.

This is crucial for accurate reporting, as our system relies on standard headers to derive important information such as device type.

We don’t provide specific guidelines for individual header values, as browsers and HTTP clients send predefined values. However, it’s important to handle these headers correctly. For more details on common request headers, refer to Mozilla Developer Network's Glossary on Request Headers.