File tree Expand file tree Collapse file tree 4 files changed +6
-5
lines changed
common/src/utils/analytics Expand file tree Collapse file tree 4 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ export const withLoadApp = <T>(
3434 actions . internal . setPatronPrice ( ) ;
3535 actions . internal . setSignedInCookie ( ) ;
3636 effects . analytics . identify ( 'signed_in' , true ) ;
37- effects . analytics . setUserId ( state . user . id ) ;
37+ effects . analytics . setUserId ( state . user . id , state . user . email ) ;
3838 try {
3939 actions . internal . trackCurrentTeams ( ) ;
4040 } catch ( e ) {
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ export const signIn: AsyncAction<{ useExtraScopes?: boolean }> = async (
3131 actions . internal . setPatronPrice ( ) ;
3232 actions . internal . setSignedInCookie ( ) ;
3333 effects . analytics . identify ( 'signed_in' , true ) ;
34- effects . analytics . setUserId ( state . user . id ) ;
34+ effects . analytics . setUserId ( state . user . id , state . user . email ) ;
3535 actions . internal . setStoredSettings ( ) ;
3636 effects . live . connect ( ) ;
3737 actions . userNotifications . internal . initialize ( ) ; // Seemed a bit different originally?
Original file line number Diff line number Diff line change @@ -57,13 +57,13 @@ export async function setAnonymousId() {
5757 }
5858}
5959
60- export async function setUserId ( userId : string ) {
60+ export async function setUserId ( userId : string , email : string ) {
6161 if ( ! DO_NOT_TRACK_ENABLED ) {
6262 const hashedId = getHashedUserId ( userId ) ;
6363
6464 amplitude . setUserId ( hashedId ) ;
6565 sentry . setUserId ( hashedId ) ;
66- vero . setUserId ( hashedId ) ;
66+ vero . setUserId ( hashedId , email ) ;
6767 }
6868}
6969
Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ export const setAnonymousUserId = (userId: string) => {
6464 processArray ( ) ;
6565} ;
6666
67- export const setUserId = ( userId : string ) => {
67+ export const setUserId = ( userId : string , email : string ) => {
6868 if ( ! _script ) {
6969 _script = loadScript ( ) ;
7070 }
@@ -74,6 +74,7 @@ export const setUserId = (userId: string) => {
7474 'user' ,
7575 {
7676 id : userId ,
77+ email,
7778 } ,
7879 ] ) ;
7980 } else {
You can’t perform that action at this time.
0 commit comments