File tree Expand file tree Collapse file tree 10 files changed +45
-1
lines changed
stable-with-resource-limits Expand file tree Collapse file tree 10 files changed +45
-1
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ server {
19
19
window.TRACKING_STRATEGY = "$TRACKING_STRATEGY";
20
20
window.PAPERCUPS_STORYTIME = "$PAPERCUPS_STORYTIME";
21
21
window.FULLSTORY = "$FULLSTORY";
22
+ window.OPENREPLAY = "$OPENREPLAY";
22
23
window.AIRBYTE_VERSION = "$AIRBYTE_VERSION";
23
24
window.API_URL = "$API_URL";
24
25
window.IS_DEMO = "$IS_DEMO";
Original file line number Diff line number Diff line change 16
16
"@fortawesome/free-solid-svg-icons" : " ^5.12.1" ,
17
17
"@fortawesome/react-fontawesome" : " ^0.1.8" ,
18
18
"@fullstory/browser" : " ^1.4.9" ,
19
+ "@openreplay/tracker" : " ^3.0.5" ,
19
20
"@papercups-io/chat-widget" : " ^1.1.5" ,
20
21
"@papercups-io/storytime" : " ^1.0.6" ,
21
22
"@rest-hooks/legacy" : " ^2.0.5" ,
Original file line number Diff line number Diff line change
1
+ import { useMemo } from "react" ;
2
+ import OpenReplay from "@openreplay/tracker" ;
3
+
4
+ const useOpenReplay = ( projectKey : string ) : OpenReplay => {
5
+ return useMemo ( ( ) => {
6
+ const tracker = new OpenReplay ( {
7
+ projectKey : projectKey ,
8
+ } ) ;
9
+
10
+ tracker . start ( ) ;
11
+
12
+ return tracker ;
13
+ } , [ projectKey ] ) ;
14
+ } ;
15
+
16
+ export default useOpenReplay ;
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ declare global {
6
6
TRACKING_STRATEGY ?: string ;
7
7
PAPERCUPS_STORYTIME ?: string ;
8
8
FULLSTORY ?: string ;
9
+ OPENREPLAY ?: string ;
9
10
AIRBYTE_VERSION ?: string ;
10
11
API_URL ?: string ;
11
12
IS_DEMO ?: string ;
@@ -32,6 +33,9 @@ type Config = {
32
33
baseUrl : string ;
33
34
enableStorytime : boolean ;
34
35
} ;
36
+ openreplay : {
37
+ projectKey : string ;
38
+ } ;
35
39
fullstory : Fullstory . SnippetOptions ;
36
40
apiUrl : string ;
37
41
healthCheckInterval : number ;
@@ -67,6 +71,9 @@ const config: Config = {
67
71
baseUrl : "https://app.papercups.io" ,
68
72
enableStorytime : window . PAPERCUPS_STORYTIME !== "disabled" ,
69
73
} ,
74
+ openreplay : {
75
+ projectKey : window . OPENREPLAY !== "disabled" ? "6611843272536134" : "" ,
76
+ } ,
70
77
fullstory : {
71
78
orgId : "13AXQ4" ,
72
79
devMode : window . FULLSTORY === "disabled" ,
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ import useWorkspace from "components/hooks/services/useWorkspaceHook";
26
26
import { AnalyticsService } from "core/analytics/AnalyticsService" ;
27
27
import { useNotificationService } from "components/hooks/services/Notification/NotificationService" ;
28
28
import { useApiHealthPoll } from "components/hooks/services/Health" ;
29
+ import useOpenReplay from "../components/hooks/useOpenReplay" ;
29
30
30
31
export enum Routes {
31
32
Preferences = "/preferences" ,
@@ -160,15 +161,17 @@ const OnboardingsRoutes = () => {
160
161
} ;
161
162
162
163
export const Routing : React . FC = ( ) => {
164
+ useApiHealthPoll ( config . healthCheckInterval ) ;
163
165
useSegment ( config . segment . token ) ;
164
166
useFullStory ( config . fullstory ) ;
165
- useApiHealthPoll ( config . healthCheckInterval ) ;
167
+ const tracker = useOpenReplay ( config . openreplay . projectKey ) ;
166
168
167
169
const { workspace } = useWorkspace ( ) ;
168
170
169
171
useEffect ( ( ) => {
170
172
if ( workspace ) {
171
173
AnalyticsService . identify ( workspace . customerId ) ;
174
+ tracker . setUserID ( workspace . customerId ) ;
172
175
}
173
176
} , [ workspace ] ) ;
174
177
Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ INTERNAL_API_HOST=airbyte-server-svc:8001
35
35
WORKER_ENVIRONMENT = kubernetes
36
36
PAPERCUPS_STORYTIME = disabled
37
37
FULLSTORY = disabled
38
+ OPENREPLAY = disabled
38
39
IS_DEMO = false
39
40
LOG_LEVEL = INFO
40
41
Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ INTERNAL_API_HOST=airbyte-server-svc:8001
35
35
WORKER_ENVIRONMENT = kubernetes
36
36
PAPERCUPS_STORYTIME = enabled
37
37
FULLSTORY = enabled
38
+ OPENREPLAY = enabled
38
39
IS_DEMO = false
39
40
LOG_LEVEL = INFO
40
41
Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ INTERNAL_API_HOST=airbyte-server-svc:8001
35
35
WORKER_ENVIRONMENT = kubernetes
36
36
PAPERCUPS_STORYTIME = enabled
37
37
FULLSTORY = enabled
38
+ OPENREPLAY = enabled
38
39
IS_DEMO = false
39
40
LOG_LEVEL = INFO
40
41
Original file line number Diff line number Diff line change 53
53
configMapKeyRef :
54
54
name : airbyte-env
55
55
key : FULLSTORY
56
+ - name : OPENREPLAY
57
+ valueFrom :
58
+ configMapKeyRef :
59
+ name : airbyte-env
60
+ key : OPENREPLAY
56
61
- name : IS_DEMO
57
62
valueFrom :
58
63
configMapKeyRef :
You can’t perform that action at this time.
0 commit comments