feat(headless-commerce): use getVisitorID to set clientId#3628
Merged
sallainCoveo merged 3 commits intomasterfrom Feb 26, 2024
Merged
feat(headless-commerce): use getVisitorID to set clientId#3628sallainCoveo merged 3 commits intomasterfrom
sallainCoveo merged 3 commits intomasterfrom
Conversation
|
Pull Request Report PR Title ✅ Title follows the conventional commit spec. Bundle Size
|
3ea49f8 to
d2d1f3c
Compare
samisayegh
reviewed
Feb 22, 2024
f6db53a to
077b1f9
Compare
louis-bompart
added a commit
that referenced
this pull request
Feb 26, 2024
)" This reverts commit 7adf769.
sallainCoveo
added a commit
that referenced
this pull request
Feb 27, 2024
* feat(commerce): get clientId from Relay instead of state * refactor(event-protocol-utils): set getClientId method * refactor(headless-commerce): use getVisitorId
github-merge-queue bot
pushed a commit
that referenced
this pull request
Feb 27, 2024
* feat(headless-commerce): use getVisitorID to set clientId (#3628) * feat(commerce): get clientId from Relay instead of state * refactor(event-protocol-utils): set getClientId method * refactor(headless-commerce): use getVisitorId * fix(commerce-face-search-request-builder): set await to builder
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Jira: https://coveord.atlassian.net/browse/LENS-1525
First part to potentially improve attribution. Previously, the
clientIdwas set in the state, using an action to update the commerceContext. This branch is to instead fetch theclientIdfor the commerce API's request. To do so, I'm using thegetVisitorIDfunction fromcoveoua. Although we want to focus onRelayin the future, we will be using the stable functionality used across the package for now. Beside, theclientIdvalue should be the same for both analytics' package.To test it, I've linked the local build to barca sport to test this change. The first part of the following demo is from the current state of Barca sports in DEV, then the second part is what is done is in a local environment:
demo_headless_clientid_from_relay.mp4
When it's merge, we can update Barca sports.