Location-based recommendations

Coveo Machine Learning (Coveo ML) Product Recommendations models learn from user behavior to automatically improve Coveo-powered content relevance (see Leverage Machine Learning Product Recommendations (PR)).

You can take the relevance of Coveo ML PR models one step further by using customers' location as information to be used to personalize a model’s output.

EXAMPLE

You get the following information about your users location when they access your Coveo-powered commerce portal:

  • Country

  • Region

  • City

Your home page contains a recommendation interface powered by a Coveo ML PR model that leverages the Popular items (bought) strategy.

To personalize the recommendations and promote products adapted to each user’s location, you set the users' country, region, and city to be consumed by Coveo ML.

Leveraging location-based recommendations

When a user performs actions on a Coveo-powered interface, Coveo gathers usage analytics (UA) dimensions, which are passed along with the Coveo Usage Analytics (Coveo UA) requests generated by the user’s actions.

Coveo automatically records users' location through their IP address. This information is kept in UA dimensions, such as city, country, and region.

This information is automatically consumed by Coveo ML PR models during the training phase. However, you must send this information to the Search API when querying the model to ensure the model returns recommendations scoped on location.

To do so, ensure that the captured user’s location is sent through the context query parameter when querying the Coveo ML PR model.

EXAMPLE
"context": {
    "country":"Canada",
    "city":"Montreal",
    "region":"Quebec"
}