-
Notifications
You must be signed in to change notification settings - Fork 146
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(web-analytics): Send timezone to flags v2 #1849
Conversation
It's needed to figure out the user's calendar date, for the cookieless hash
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -71,6 +71,14 @@ export default function Home() { | |||
|
|||
<button className="ph-no-capture">Ignore certain elements</button> | |||
|
|||
<button | |||
onClick={() => { | |||
posthog?.reloadFeatureFlags() |
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 just included this button here as it's a reliable way to trigger a call to the flags endpoint
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.
PR Summary
Adds timezone information to feature flag requests when using flags v2 API, enabling proper calendar date determination for cookieless hash functionality.
- Added timezone parameter in
src/posthog-featureflags.ts
when both__preview_flags_v2
and__preview_remote_config
configs are enabled - Added
reloadFeatureFlags
button in playground app for testing flag reloading functionality - Implementation maintains backward compatibility by only adding timezone for v2 API requests
- Uses existing
Info.timezone()
utility to retrieve timezone data
2 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile
Size Change: +300 B (+0.01%) Total Size: 3.64 MB
ℹ️ View Unchanged
|
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.
LGTM
Changes
Send timezone to flags v2. It's needed to figure out the user's calendar date, for the cookieless hash. We should merge PostHog/posthog#30304 first
Checklist