-
Notifications
You must be signed in to change notification settings - Fork 322
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
Aswathy/fix: Incorrect Logged-In Status and Missing Residence Country in Growthbook #17966
base: master
Are you sure you want to change the base?
Aswathy/fix: Incorrect Logged-In Status and Missing Residence Country in Growthbook #17966
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
A production App ID was automatically generated for this PR. (log)
Click here to copy & paste above information.
|
🚨 Lighthouse report for the changes in this PR:
Lighthouse ran with https://deriv-app-git-fork-aswathy-deriv-loggedinresidenceissue.binary.sx/ |
}, | ||
}; | ||
Analytics.setAttributes(analytics_config_config); | ||
await Analytics?.initialise(config); |
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.
[Q]: why do we need to initialize the whole Analytics package again? 🤔 only updating the attributes would be enough.
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.
It will work only when we re-initialize it for the logout session.can you check it and let me know if it is possible in any other way.
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.
I'm looking into this. will update you on this
|
||
const client_information = Cookies.getJSON('client_information'); | ||
const client_information = Cookies.get('client_information') | ||
? JSON.parse(Cookies.get('client_information') || '') |
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.
we are checking if cookie exists in line 31. So do we need || ''
in line 32 again?
if (process.env.REMOTE_CONFIG_URL) { | ||
const flags = await fetch(process.env.REMOTE_CONFIG_URL) | ||
.then(res => res.json()) | ||
.catch(() => FIREBASE_INIT_DATA); |
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.
why do we need this whole initialization again?
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.
The attributes are not getting updated without initialization.we can check if there is a way without doing the initialization again.
}, | ||
}, | ||
}; | ||
await Analytics?.initialise(config); | ||
Analytics.setAttributes(analytics_config_config); |
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.
What is the use of setAttributes here? we have initialized growthbook with same config in line 65
and nothing changed in attributes.
We can close this PR in favor of PR #18037 |
Changes:
Please provide a summary of the change.
Screenshots:
Please provide some screenshots of the change.