diff --git a/packages/core-components/src/layout/SignInPage/SignInPage.tsx b/packages/core-components/src/layout/SignInPage/SignInPage.tsx index cce77b1974..24de4d4647 100644 --- a/packages/core-components/src/layout/SignInPage/SignInPage.tsx +++ b/packages/core-components/src/layout/SignInPage/SignInPage.tsx @@ -169,11 +169,7 @@ export const SingleSignInPage = ({ profile, }), ); - analytics.captureEvent('signIn', 'success', { - attributes: { - userEntityRef: identityResponse.identity.userEntityRef, - }, - }); + analytics.captureEvent('signIn', 'success'); } catch (err: any) { // User closed the sign-in modal setError(err); diff --git a/packages/core-components/src/layout/SignInPage/providers.tsx b/packages/core-components/src/layout/SignInPage/providers.tsx index d1da5deccd..e9e43e9c7e 100644 --- a/packages/core-components/src/layout/SignInPage/providers.tsx +++ b/packages/core-components/src/layout/SignInPage/providers.tsx @@ -117,15 +117,11 @@ export const useSignInProviders = ( signOut: async () => { localStorage.removeItem(PROVIDER_STORAGE_KEY); await identityApi.signOut?.(); + analytics.captureEvent('signOut', 'success'); }, }), ); - const identityResponse = await identityApi.getBackstageIdentity(); - analytics.captureEvent('signIn', 'success', { - attributes: { - userEntityRef: identityResponse.userEntityRef, - }, - }); + analytics.captureEvent('signIn', 'success'); }, [onSignInSuccess, analytics], ); diff --git a/plugins/user-settings/src/components/General/UserSettingsMenu.tsx b/plugins/user-settings/src/components/General/UserSettingsMenu.tsx index e7906a971a..dc954e862f 100644 --- a/plugins/user-settings/src/components/General/UserSettingsMenu.tsx +++ b/plugins/user-settings/src/components/General/UserSettingsMenu.tsx @@ -63,13 +63,7 @@ export const UserSettingsMenu = () => { data-testid="sign-out" onClick={() => { identityApi.signOut().catch(error => errorApi.post(error)); - identityApi.getBackstageIdentity().then(identity => { - analytics.captureEvent('signOut', 'success', { - attributes: { - userEntityRef: identity.userEntityRef, - }, - }); - }); + analytics.captureEvent('signOut', 'success'); }} >