Skip to content

Commit a9a8769

Browse files
committed
Remove segment analytics
1 parent c516321 commit a9a8769

File tree

6 files changed

+0
-27
lines changed

6 files changed

+0
-27
lines changed

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
"@datadog/browser-logs": "^4.21.2",
2525
"@heroicons/react": "^1.0.6",
2626
"@popperjs/core": "^2.11.8",
27-
"@segment/analytics-next": "^1.53.3",
2827
"@sprig-technologies/sprig-browser": "^2.20.1",
2928
"@storybook/addon-actions": "^7.0.5",
3029
"@storybook/react": "^7.0.5",

src/apps/platform/src/PlatformApp.tsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { FC } from 'react'
22
import { toast, ToastContainer } from 'react-toastify'
33

4-
import { AnalyticsBrowser } from '@segment/analytics-next'
54
import { useViewportUnitsFix } from '~/libs/shared'
65
import { EnvironmentConfig } from '~/config'
76

@@ -10,10 +9,6 @@ import { AppHeader } from './components/app-header'
109
import { Providers } from './providers'
1110
import { PlatformRouter } from './platform-router'
1211

13-
if (EnvironmentConfig.SEGMENT_ANALYTICS_KEY) {
14-
window.tcSegment = AnalyticsBrowser.load({ writeKey: EnvironmentConfig.SEGMENT_ANALYTICS_KEY }) as any
15-
}
16-
1712
const PlatformApp: FC<{}> = () => {
1813
useViewportUnitsFix()
1914

src/config/environments/default.env.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ export const GAMIFICATION_ORG_ID = getReactEnv<string>('GAMIFICATION_ORG_ID', un
6868
// TODO: Revert this. This was done because prod was restricting this and no one was available to fix the config
6969
// export const RESTRICT_TALENT_SEARCH = getReactEnv<boolean>('RESTRICT_TALENT_SEARCH', false)
7070
export const RESTRICT_TALENT_SEARCH = false
71-
export const SEGMENT_ANALYTICS_KEY = getReactEnv<string>('SEGMENT_ANALYTICS_KEY', undefined)
7271

7372
export const USERFLOW_SURVEYS = {
7473
ACCOUNT_SETTINGS: getReactEnv<string>('USERFLOW_SURVEY_ACCOUNT_SETTINGS', '3e704fe0-dff4-4af4-abee-383ed162729e'),

src/config/environments/global-config.model.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ export interface GlobalConfig {
3737
SUBDOMAIN: string,
3838
GAMIFICATION_ORG_ID: string
3939
RESTRICT_TALENT_SEARCH: boolean
40-
SEGMENT_ANALYTICS_KEY: string
4140
USERFLOW_SURVEYS: {
4241
ACCOUNT_SETTINGS: string
4342
PROFILES: string

src/libs/core/lib/auth/token-functions/token.functions.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import { decodeToken } from 'tc-auth-lib'
22

3-
import { ID } from '@segment/analytics-next'
4-
53
import { authInitializeAsync } from '../authentication-functions'
64
import { logError } from '../../logger'
75

@@ -29,14 +27,6 @@ export async function getAsync(): Promise<TokenModel> {
2927
return Promise.resolve({})
3028
}
3129

32-
// segment identify user
33-
if (window && window.tcSegment) {
34-
window.tcSegment.identify(userId as ID, {
35-
handle,
36-
roles,
37-
})
38-
}
39-
4030
return Promise.resolve({ handle, roles, token, userId })
4131

4232
// eslint-disable-next-line @typescript-eslint/no-explicit-any

src/types/index.d.ts

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)