File tree Expand file tree Collapse file tree 3 files changed +6
-2
lines changed
Expand file tree Collapse file tree 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'
66import { AuthModal , useAuth } from 'src/features/auth'
77import { usePostStreak } from 'src/features/hits'
88import { MarketingBanner } from 'src/features/MarketingBanner'
9+ import { identifyUserStreak } from 'src/lib/analytics'
910import { AuthProvider } from 'src/providers/AuthProvider'
1011import { Header } from './Header'
1112
@@ -17,6 +18,7 @@ export const AppLayout = () => {
1718 if ( isConnected ) {
1819 postStreakMutation . mutateAsync ( undefined ) . then ( ( data ) => {
1920 setStreak ( data . streak )
21+ identifyUserStreak ( data . streak )
2022 } )
2123 }
2224 } , [ isConnected ] )
Original file line number Diff line number Diff line change @@ -73,6 +73,7 @@ export enum Attributes {
7373 DURATION = 'Duration' ,
7474 PROVIDER = 'Provider' ,
7575 ADV = 'ADV' ,
76+ STREAK = 'Streak' ,
7677}
7778
7879const _SEP_ = ' '
@@ -434,7 +435,9 @@ export const identifyUserMaxVisibleCards = (maxVisibleCards: number) => {
434435export const identifyAdvBlocked = ( blocked : boolean ) => {
435436 identifyUserProperty ( Attributes . ADV , blocked )
436437}
437-
438+ export const identifyUserStreak = ( value : number ) => {
439+ identifyUserProperty ( Attributes . STREAK , value )
440+ }
438441// Private functions
439442type trackEventProps = {
440443 object : Exclude < Objects , null | undefined >
Original file line number Diff line number Diff line change @@ -32,6 +32,5 @@ const getUserToken = async () => {
3232 }
3333 unsub ( )
3434 } )
35- resolve ( 'abc' )
3635 } )
3736}
You can’t perform that action at this time.
0 commit comments