@@ -219,10 +219,12 @@ final class InternalIterableAPI: NSObject, PushTrackerProtocol, AuthProvider {
219
219
}
220
220
221
221
func setAnonymousUsageTracked( isAnonymousUsageTracked: Bool ) {
222
+ ITBInfo ( " CONSENT CHANGED - local events cleared " )
222
223
self . localStorage. anonymousUsageTrack = isAnonymousUsageTracked
223
224
self . localStorage. anonymousUserEvents = nil
224
225
self . localStorage. anonymousSessions = nil
225
226
if isAnonymousUsageTracked {
227
+ ITBInfo ( " CONSENT GIVEN - Criteria fetched " )
226
228
self . anonymousUserManager. getAnonCriteria ( )
227
229
self . anonymousUserManager. updateAnonSession ( )
228
230
}
@@ -309,6 +311,7 @@ final class InternalIterableAPI: NSObject, PushTrackerProtocol, AuthProvider {
309
311
onFailure: OnFailureHandler ? = nil ) -> Pending < SendRequestValue , SendRequestError > {
310
312
if !isEitherUserIdOrEmailSet( ) && localStorage. userIdAnnon == nil {
311
313
if config. enableAnonTracking {
314
+ ITBInfo ( " AUT ENABLED - anon update user " )
312
315
anonymousUserManager. trackAnonUpdateUser ( dataFields)
313
316
}
314
317
return rejectWithInitializationError ( onFailure: onFailure)
@@ -340,6 +343,7 @@ final class InternalIterableAPI: NSObject, PushTrackerProtocol, AuthProvider {
340
343
onFailure: OnFailureHandler ? = nil ) -> Pending < SendRequestValue , SendRequestError > {
341
344
if !isEitherUserIdOrEmailSet( ) && localStorage. userIdAnnon == nil {
342
345
if config. enableAnonTracking {
346
+ ITBInfo ( " AUT ENABLED - anon update cart " )
343
347
anonymousUserManager. trackAnonUpdateCart ( items: items)
344
348
}
345
349
return rejectWithInitializationError ( onFailure: onFailure)
@@ -372,6 +376,7 @@ final class InternalIterableAPI: NSObject, PushTrackerProtocol, AuthProvider {
372
376
onFailure: OnFailureHandler ? = nil ) -> Pending < SendRequestValue , SendRequestError > {
373
377
if !isEitherUserIdOrEmailSet( ) {
374
378
if config. enableAnonTracking {
379
+ ITBInfo ( " AUT ENABLED - anon track purchase " )
375
380
anonymousUserManager. trackAnonPurchaseEvent ( total: total, items: items, dataFields: dataFields)
376
381
}
377
382
return rejectWithInitializationError ( onFailure: onFailure)
@@ -445,6 +450,7 @@ final class InternalIterableAPI: NSObject, PushTrackerProtocol, AuthProvider {
445
450
onFailure: OnFailureHandler ? = nil ) -> Pending < SendRequestValue , SendRequestError > {
446
451
if !isEitherUserIdOrEmailSet( ) && localStorage. userIdAnnon == nil {
447
452
if config. enableAnonTracking {
453
+ ITBInfo ( " AUT ENABLED - anon track custom event " )
448
454
anonymousUserManager. trackAnonEvent ( name: eventName, dataFields: dataFields)
449
455
}
450
456
return rejectWithInitializationError ( onFailure: onFailure)
0 commit comments