Skip to content

Releases: algolia/recommend

v1.16.0

18 Dec 11:21
30ad060

Choose a tag to compare

1.16.0 (2024-12-18)

Bug Fixes

  • update the readme of js/react packages (#186) (9b4f553)

Features

  • Add queryID & postion as a preperation for Recommend Analytics [RECO-2391] (#192) (c5e44de)

v1.15.0

23 May 12:12
8a3b8cc

Choose a tag to compare

1.15.0 (2024-05-23)

Add deprecation notice to the project's ReadMe

v1.14.0

01 Feb 10:24
6311b7f

Choose a tag to compare

1.14.0 (2024-02-01)

Features

  • Add Personalized Recommendations (experimental) (#174) (9ed2bfc)

Personalized recommendations

We want to add experimental support for personalized recommendations, using Algolia Personalization "Classic"

This is an experimental UI library implementation that stitches together existing APIs.

A reference guide will also be shared for users who want to implement this in the flavor of their choice.

How to use

To enable personalisation with recommend, you'll need to import from /experimental-personalization like the following:

JavaScript

import { trendingItems } from '@algolia/recommend-js/dist/esm/experimental-personalization';

trendingItems({
  region: 'eu', // "eu" | "us"
  userToken: 'user_token',
  indexName: "indexName"
  // ...

Or by using a standalone endpoint:

<script src="https://cdn.jsdelivr.net/npm/@algolia/recommend-js/dist/umd/experimental-personalization/index.js"></script>

React

import { TrendingItems } from '@algolia/recommend-react/dist/esm/experimental-personalization';

<TrendingItems
  region="eu" // "eu" | "us"
  userToken="user_token"
  indexName="indexName"
  // ...

Or by using a standalone endpoint:

<script src="https://cdn.jsdelivr.net/npm/@algolia/recommend-react/dist/umd/experimental-personalization/index.js"></script>

We avoid using the pre-existing queryParameters for userToken to avoid unexpected side-effects as well as possible semantic-versioning headaches if/when personalized recommendations is supported by the Recommend API and the experimental parameter is removed.

Parameters

The following parameters are all required for personalization:

  • region : Personalization data is stored and processed in a specific region. You can check the region for your account in the Algolia dashboard.
  • userToken : Associates a certain user token with the current query learn more
  • suppressExperimentalWarning: (optional) boolean parameter to disable the experimental console warning message.

Notes

  • When using recommend-react: if the Recommend context is used for batching, the userToken passed to the component take precedence over the one passed to the context. (ie if you pass 2 different user-tokens between the context provider and the recommend component, the one from the component is used)

  • When using the <Recommend> React context provider, you will need to import all the components from /experimental-personalization.

  • Caching is proposed in a follow-up PR #175

v1.13.0

30 Jan 15:46
599794e

Choose a tag to compare

1.13.0 (2024-01-30)

Bug Fixes

  • Next.js 14 error "pragma cannot be set when runtime is automatic" [RECO-2015] (#177) (4616f25)

v1.12.1

24 Jan 09:14
b3b07fc

Choose a tag to compare

1.12.1 (2024-01-24)

Bug Fixes

Features

v1.12.0

09 Jan 14:58
a7e32f8

Choose a tag to compare

1.12.0 (2024-01-09)

Bug Fixes

Update trending-facets model types inherited from @algolia/recommend v4.22.0

https://github.com/algolia/algoliasearch-client-javascript/releases/tag/4.22.0

🤷 Why

The trending-facets API only returns type string for facetValue.

All other models return items/hits which are of type RecordWithObjectID

However trending-facets model returns a list of TrendingFacetHit which (by definition) don't have an objectID property.

To simplify the code, we can remove the type argument TObject for trending-facets

🔍 How to upgrade

If you're not using TypeScript, there is nothing to change. You can ignore the following.

If you're using TypeScript, and the trending-facets model, you should update your code like the following, by removing the type argument passed:

// The TrendingFacets React component usage goes from this:

type FacetHit = Hit<{
  facetName: string;
  facetValue: string;
}>
<TrendingFacets<FacetHit>
  indexName="my-index"
  // ...

// To this:
<TrendingFacets
  indexName="my-index"
  // ...

// or using hooks
const results = useTrendingFacets<FacetHit>(/* params */)
// becomes like this in v1.12.0
const results = useTrendingFacets(/* params */)

If you're using @algolia/recommend-js you can remove the FacetHit type in a similar way:

trendingFacets<FacetHit>({
  container: '#trendingFacets',
  indexName,
  // ...

// needs to be changed like this after v1.12.0: 
trendingFacets({
  container: '#trendingFacets',
  indexName,
  // ...

If you encounter an issue with the upgrade, open an issue referencing this release.

v1.11.0

13 Dec 14:34
9c525a3

Choose a tag to compare

1.11.0 (2023-12-13)

Bug Fixes

  • add to cart button propagation and css click (#156) (671670b)
  • Fix @algolia/recommend-react package description (#154) (01110a3)
  • react example: allow linking to a specific product (#157) (0eb314a)

Features

v1.10.0

26 Sep 08:02
c10c723

Choose a tag to compare

1.10.0 (2023-09-26)

Bug Fixes

Features

  • implement Recommend Batch Context (RECO-961) (#131) (fe347ed)

v1.9.0

21 Jul 08:40
da56481

Choose a tag to compare

1.9.0 (2023-07-21)

Features

v1.8.2

13 Jun 06:32
9006fd2

Choose a tag to compare

1.8.2 (2023-06-12)

Bug Fixes

  • remove VDOM renderer typings from React component props (#140) (9ba18b7)