File tree 1 file changed +10
-0
lines changed
1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,7 @@ export interface WithJWT {
57
57
logout : ( ) => void ;
58
58
refreshJwtToken : ( authTypes : string ) => Promise < string > ;
59
59
setVisitorUsageTracked : ( consent : boolean ) => void ;
60
+ clearVisitorEventsAndUserData : ( ) => void ;
60
61
}
61
62
62
63
export interface WithoutJWT {
@@ -66,6 +67,7 @@ export interface WithoutJWT {
66
67
setUserID : ( userId : string , identityResolution ?: IdentityResolution ) => Promise < void > ;
67
68
logout : ( ) => void ;
68
69
setVisitorUsageTracked : ( consent : boolean ) => void ;
70
+ clearVisitorEventsAndUserData : ( ) => void ;
69
71
}
70
72
71
73
export const setAnonUserId = async ( userId : string ) => {
@@ -568,6 +570,10 @@ export function initialize(
568
570
}
569
571
localStorage . setItem ( SHARED_PREF_ANON_USAGE_TRACKED , 'false' ) ;
570
572
}
573
+ } ,
574
+ clearVisitorEventsAndUserData : ( ) => {
575
+ anonUserManager . removeAnonSessionCriteriaData ( ) ;
576
+ clearAnonymousUser ( ) ;
571
577
}
572
578
} ;
573
579
}
@@ -988,6 +994,10 @@ export function initialize(
988
994
}
989
995
localStorage . setItem ( SHARED_PREF_ANON_USAGE_TRACKED , 'false' ) ;
990
996
}
997
+ } ,
998
+ clearVisitorEventsAndUserData : ( ) => {
999
+ anonUserManager . removeAnonSessionCriteriaData ( ) ;
1000
+ clearAnonymousUser ( ) ;
991
1001
}
992
1002
} ;
993
1003
}
You can’t perform that action at this time.
0 commit comments