@@ -588,7 +588,11 @@ export class KnockGuideClient {
588588
589589 this . store . setState ( ( state ) => ( {
590590 ...state ,
591- debug : { ...debugOpts , debugging : true } ,
591+ debug : {
592+ skipEngagementTracking : true ,
593+ ...debugOpts ,
594+ debugging : true ,
595+ } ,
592596 } ) ) ;
593597
594598 if ( shouldRefetch ) {
@@ -970,6 +974,13 @@ export class KnockGuideClient {
970974 } ) ;
971975 if ( ! updatedStep ) return ;
972976
977+ if ( this . shouldSkipEngagementApi ( ) ) {
978+ this . knock . log (
979+ "[Guide] Skipping engagement API call for markAsSeen (debug mode)" ,
980+ ) ;
981+ return updatedStep ;
982+ }
983+
973984 const params = {
974985 ...this . buildEngagementEventBaseParams ( guide , updatedStep ) ,
975986 content : updatedStep . content ,
@@ -1000,6 +1011,13 @@ export class KnockGuideClient {
10001011 } ) ;
10011012 if ( ! updatedStep ) return ;
10021013
1014+ if ( this . shouldSkipEngagementApi ( ) ) {
1015+ this . knock . log (
1016+ "[Guide] Skipping engagement API call for markAsInteracted (debug mode)" ,
1017+ ) ;
1018+ return updatedStep ;
1019+ }
1020+
10031021 const params = {
10041022 ...this . buildEngagementEventBaseParams ( guide , updatedStep ) ,
10051023 metadata,
@@ -1025,6 +1043,13 @@ export class KnockGuideClient {
10251043 } ) ;
10261044 if ( ! updatedStep ) return ;
10271045
1046+ if ( this . shouldSkipEngagementApi ( ) ) {
1047+ this . knock . log (
1048+ "[Guide] Skipping engagement API call for markAsArchived (debug mode)" ,
1049+ ) ;
1050+ return updatedStep ;
1051+ }
1052+
10281053 const params = this . buildEngagementEventBaseParams ( guide , updatedStep ) ;
10291054
10301055 this . knock . user . markGuideStepAs < MarkAsArchivedParams , MarkGuideAsResponse > (
@@ -1038,6 +1063,10 @@ export class KnockGuideClient {
10381063 return updatedStep ;
10391064 }
10401065
1066+ private shouldSkipEngagementApi ( ) : boolean {
1067+ return ! ! this . store . state . debug ?. skipEngagementTracking ;
1068+ }
1069+
10411070 //
10421071 // Helpers
10431072 //
0 commit comments