From 24da031a44fb3f0cd2ea536e5bb686c9bf15bb1d Mon Sep 17 00:00:00 2001 From: Rodrigo Orem Date: Tue, 5 Dec 2023 14:40:53 -0300 Subject: [PATCH 1/2] feat: add anonymousId param to sponsoredProducts --- react/components/SearchQuery.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/react/components/SearchQuery.js b/react/components/SearchQuery.js index e3781893..80bfba30 100644 --- a/react/components/SearchQuery.js +++ b/react/components/SearchQuery.js @@ -208,7 +208,10 @@ const useQueries = ( loading: sponsoredProductLoading, error: sponsoredProductsError, } = useQuery(sponsoredProductsQuery, { - variables, + variables: { + ...variables, + anonymousId: getCookie('biggy-anonymous'), + }, skip: shouldSkipSponsoredProducts(sponsoredProductsBehavior, settings), }) From 81eacbb2f5727a48dd50f54e6de2a37d07e9bb61 Mon Sep 17 00:00:00 2001 From: Rodrigo Orem Date: Thu, 7 Dec 2023 09:36:45 -0300 Subject: [PATCH 2/2] chore: update CHANGELOG --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a96ed325..03004646 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +### Added + +- Created query parameter `anonymousId` for `sponsoredProducts` used on A/B testing. + ## [3.128.2] - 2023-12-07 ### Added