Including an Interaction

If a specific View Controller has been previously excluded from being recognized as an Interaction, it can be included back into tracking by using the includeAutomaticInteraction method.

In your viewDidLoad or any other view lifecycle methods, which come before the viewDidAppear method and where you have excludeAutomaticInteraction method used, call the above method as shown below:

Swift
Objective-C
override func viewDidLoad() { super.viewDidLoad() do { try MedalliaMXO.exclude(automaticInteraction: MXOAutomaticInteractionExclusion { builder in builder.viewController = self }) } catch { print("Error including an Interaction: \(error.localizedDescription)") } // some code do { try MedalliaMXO.include(automaticInteraction: MXOAutomaticInteractionInclusion { builder in builder.viewController = self }) } catch { print("Error including an Interaction: \(error.localizedDescription)") } }
- (void)viewDidLoad {    
	[super viewDidLoad];
	NSError *error;
    	__weak typeof(self) weakSelf = self;
    	
	[MedalliaMXO excludeAutomaticInteraction:[MXOAutomaticInteractionExclusion initWithBuilder:^(MXOAutomaticInteractionExclusionBuilder * _Nonnull builder) {
        	builder.viewController = weakSelf;
    	}] error:&error];
	//some code
	[MedalliaMXO includeAutomaticInteraction:[MXOAutomaticInteractionInclusion initWithBuilder:^(MXOAutomaticInteractionInclusionBuilder * _Nonnull builder) {
        	builder.viewController = weakSelf;
    	}] error:&error];
    
    	if (error) {
        	NSLog(@"Error including an Interaction: %@", [error debugDescription]);
    	}
}