File tree 3 files changed +6
-2
lines changed 3 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import 'src/assets/App.css'
6
6
import { AuthModal , useAuth } from 'src/features/auth'
7
7
import { usePostStreak } from 'src/features/hits'
8
8
import { MarketingBanner } from 'src/features/MarketingBanner'
9
+ import { identifyUserStreak } from 'src/lib/analytics'
9
10
import { AuthProvider } from 'src/providers/AuthProvider'
10
11
import { Header } from './Header'
11
12
@@ -17,6 +18,7 @@ export const AppLayout = () => {
17
18
if ( isConnected ) {
18
19
postStreakMutation . mutateAsync ( undefined ) . then ( ( data ) => {
19
20
setStreak ( data . streak )
21
+ identifyUserStreak ( data . streak )
20
22
} )
21
23
}
22
24
} , [ isConnected ] )
Original file line number Diff line number Diff line change @@ -73,6 +73,7 @@ export enum Attributes {
73
73
DURATION = 'Duration' ,
74
74
PROVIDER = 'Provider' ,
75
75
ADV = 'ADV' ,
76
+ STREAK = 'Streak' ,
76
77
}
77
78
78
79
const _SEP_ = ' '
@@ -434,7 +435,9 @@ export const identifyUserMaxVisibleCards = (maxVisibleCards: number) => {
434
435
export const identifyAdvBlocked = ( blocked : boolean ) => {
435
436
identifyUserProperty ( Attributes . ADV , blocked )
436
437
}
437
-
438
+ export const identifyUserStreak = ( value : number ) => {
439
+ identifyUserProperty ( Attributes . STREAK , value )
440
+ }
438
441
// Private functions
439
442
type trackEventProps = {
440
443
object : Exclude < Objects , null | undefined >
Original file line number Diff line number Diff line change @@ -32,6 +32,5 @@ const getUserToken = async () => {
32
32
}
33
33
unsub ( )
34
34
} )
35
- resolve ( 'abc' )
36
35
} )
37
36
}
You can’t perform that action at this time.
0 commit comments