-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(headless-commerce): use getVisitorID to set clientId #3628
Conversation
Pull Request Report PR Title ✅ Title follows the conventional commit spec. Bundle Size
|
3ea49f8
to
d2d1f3c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great ✅
f6db53a
to
077b1f9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯
)" This reverts commit 7adf769.
* feat(commerce): get clientId from Relay instead of state * refactor(event-protocol-utils): set getClientId method * refactor(headless-commerce): use getVisitorId
* 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
Jira: https://coveord.atlassian.net/browse/LENS-1525
First part to potentially improve attribution. Previously, the
clientId
was set in the state, using an action to update the commerceContext. This branch is to instead fetch theclientId
for the commerce API's request. To do so, I'm using thegetVisitorID
function fromcoveoua
. Although we want to focus onRelay
in the future, we will be using the stable functionality used across the package for now. Beside, theclientId
value 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.