Disabling automatic outbound link tracking
By default, the SDK will automatically send an Interaction request to /mxo-click
as a url is opened in Safari, SafariViewController
or WKWebView
to facilitate last click attribution.
To disable this functionality call the disableAutomaticOutboundLinkTracking
method and pass true
, as shown below:
// Disabling the automatic outbound link tracking.
MedalliaMXO.automaticInteractionTrackingConfiguration = MXOAutomaticInteractionTrackingConfiguration { builder in
builder.disableOutboundLinkTracking = true
}
// Updating the automatic outbound link tracking configuration.
let builder = MedalliaMXO.automaticInteractionTrackingConfiguration?.builder() ?? MXOAutomaticInteractionTrackingConfigurationBuilder()
builder.disableOutboundLinkTracking = false
MedalliaMXO.automaticInteractionTrackingConfiguration = builder.build()
// Disabling the automatic outbound link tracking.
MedalliaMXO.automaticInteractionTrackingConfiguration = [MXOAutomaticInteractionTrackingConfiguration initWithBuilder:^(MXOAutomaticInteractionTrackingConfigurationBuilder * _Nonnull builder) {
builder.disableOutboundLinkTracking = YES;
}];
// Updating the automatic outbound link tracking configuration.
MXOAutomaticInteractionTrackingConfigurationBuilder *builder = MedalliaMXO.automaticInteractionTrackingConfiguration.builder ? MedalliaMXO.automaticInteractionTrackingConfiguration.builder : [MXOAutomaticInteractionTrackingConfigurationBuilder new];
builder.disableOutboundLinkTracking = NO;
MedalliaMXO.automaticInteractionTrackingConfiguration = [builder build];
If you have disabled automatic outbound link tracking, you can still trigger an outbound link tracking Interaction call programmatically to track a URL, by calling:
do {
try MedalliaMXO.sendInteraction(forOutboundLink: URL(string: "yourUrl")!)
} catch {
print("Error sending outbound link")
}
[MedalliaMXO sendInteractionForOutboundLink:[NSURL URLWithString:@"yourUrl"] error:nil];
Passing the URL will send an Interaction request /mxo-click
using the same logic as available automatically.
This will send a POST request to Medallia Experience Orchestration.