-
Notifications
You must be signed in to change notification settings - Fork 138
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: Add customization to add all person profile properties as setPersonPropertiesForFlags #1517
feat: Add customization to add all person profile properties as setPersonPropertiesForFlags #1517
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -1,10 +1,10 @@ | |||
import { version } from '../package.json' | |||
import packageInfo from '../package.json' |
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 got a warning about this, so I fixed it as a drive-by
Should not import the named export 'version' (imported as 'version') from default-exporting module (only default export is available soon)
Size Change: +194 B (+0.01%) Total Size: 3.01 MB
ℹ️ View Unchanged
|
src/customizations/setAllPersonProfilePropertiesAsPersonPropertiesForFlags.test.ts
Outdated
Show resolved
Hide resolved
'$app_build', | ||
'$app_name', | ||
'$app_namespace', | ||
'$app_version', |
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.
There are many more params than that such as $device_manufacturer
, $device_model
, etc, I wonder if this list is exhaustive to only what this SDK specifically collects?
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.
Those other ones aren't converted into person properties though, or are they? This list comes straight from plugin-server.
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 didn't check so the plugin-server should be up to date and all good.
@@ -31,6 +31,25 @@ export const CAMPAIGN_PARAMS = [ | |||
'rdt_cid', // reddit | |||
] | |||
|
|||
export const EVENT_TO_PERSON_PROPERTIES = [ |
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 think this could do with a comment or a better name...
I think it's saying "these are event properties that we will copy to person properties"
but I don't know for sure 🙈
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 don't disagree but it's copied directly from plugin server with that name, I'll add a comment though!
import { CAMPAIGN_PARAMS, EVENT_TO_PERSON_PROPERTIES, Info } from '../utils/event-utils' | ||
import { each, extend, includes } from '../utils' | ||
|
||
export const setAllPersonProfilePropertiesAsPersonPropertiesForFlags = (posthog: PostHog): void => { |
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.
could also do with a comment IMHO, why would I want to do this?
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.
👍
couple of comments but nothing blocking
I'm going to merge this now and add a couple of comments in a follow up, just as I'm in a few meetings this morning and it'd be good to get back to the customer asap |
Changes
Add a customization to set all known person properties with setPersonPropertiesForFlags
Checklist