File tree Expand file tree Collapse file tree 1 file changed +13
-6
lines changed
Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -59,19 +59,26 @@ const identify = ({
5959 // with the right data
6060 posthog . reset ( ) ;
6161 } else if ( distinctId === email ) {
62- // This session has been already identified, nothing to do!
62+ // This session has been already identified, just keep the organization synchronized!
63+ posthog . group ( 'cosmo_organization' , organizationId , {
64+ id : organizationId ,
65+ slug : organizationSlug ,
66+ name : organizationName ,
67+ plan : plan
68+ } ) ;
6369 return ;
6470 }
6571
6672 posthog . identify ( email , {
6773 id,
6874 email,
69- organizationId,
70- organizationName,
71- organizationSlug,
72- plan,
7375 } ) ;
74- posthog . group ( 'orgslug' , organizationSlug ) ;
76+ posthog . group ( 'cosmo_organization' , organizationId , {
77+ id : organizationId ,
78+ slug : organizationSlug ,
79+ name : organizationName ,
80+ plan : plan
81+ } ) ;
7582} ;
7683
7784export { resetTracking , identify } ;
You can’t perform that action at this time.
0 commit comments