Disabling automatic outbound link tracking
If the Medallia Orchestration Plugin is enabled, the SDK will automatically send an Interaction request to /mxo-click
as a url is opened in Web View, Custom Tab or external browser to facilitate last click attribution.
To disable automatic outbound link tracking, call the disableOutboundLinkTracking
Kotlin extension function or the MedalliaMXO.setAutomaticInteractionTrackingConfiguration
Java method with the appropriate configuration, as shown below:
import com.medallia.mxo.automatic.MXOAutomaticInteractionTrackingConfiguration.Companion.copy
import com.medallia.mxo.mxoAutomaticInteractionTrackingConfiguration
// Disabling the automatic outbound link tracking.
mxoAutomaticInteractionTrackingConfiguration = mxoAutomaticInteractionTrackingConfiguration.copy {
disableOutboundLinkTracking = true
}
// Updating the automatic outbound link tracking configuration.
mxoAutomaticInteractionTrackingConfiguration = mxoAutomaticInteractionTrackingConfiguration.copy {
disableOutboundLinkTracking = false
}
import com.medallia.mxo.MedalliaMXO;
import com.medallia.mxo.automatic.MXOAutomaticInteractionTrackingConfiguration;
// Disabling the automatic outbound link tracking.
final MXOAutomaticInteractionTrackingConfiguration outboundLinkTrackingConfiguration = new MXOAutomaticInteractionTrackingConfiguration.Builder()
.disableOutboundLinkTracking(true)
.build();
MedalliaMXO.setAutomaticInteractionTrackingConfiguration(outboundLinkTrackingConfiguration);
// Updating the automatic outbound link tracking configuration.
MXOAutomaticInteractionTrackingConfiguration currentConfiguration = MedalliaMXO.getAutomaticInteractionTrackingConfiguration();
MXOAutomaticInteractionTrackingConfiguration.Builder builder = currentConfiguration != null ?currentConfiguration.builder() : new MXOAutomaticInteractionTrackingConfiguration.Builder();
MXOAutomaticInteractionTrackingConfiguration updatedConfiguration = builder
.disableOutboundLinkTracking(false)
.build();
MedalliaMXO.setAutomaticInteractionTrackingConfiguration(updatedConfiguration);
If you have disabled automatic outbound link tracking, you can still track a URL or Uri, by calling the java.net.URI.sendInteractionForOutboundLink
or android.net.Uri.sendInteractionForOutboundLink
Kotlin extension functions or the MedalliaMXO.sendInteractionForOutboundLink
Java method, as shown below:
import com.medallia.mxo.sendInteractionForOutboundLink
import java.net.URI
import java.net.URL
// URL example
URL("https://www.yourfullurl.com/").sendInteractionForOutboundLink()
// URI example
URI("https://www.yourfullurl.com/").sendInteractionForOutboundLink()
Uri.parse("https://www.yourfullurl.com/").sendInteractionForOutboundLink()
import com.medallia.mxo.MedalliaMXO;
import java.net.MalformedURLException;
import java.net.URL;
import android.net.Uri;
// URL example
try {
MedalliaMXO.sendInteractionForOutboundLink(new URL("https://www.yourfullurl.com/"));
} catch (MalformedURLException e) {
e.printStackTrace();
}
// URI example
try {
MedalliaMXO.sendInteractionForOutboundLink(Uri.parse("https://www.yourfullurl.com/"));
} catch (Exception e) {
e.printStackTrace();
}
This will send a POST request to Medallia Experience Orchestration. Pass the URL or Uri, to send an Interaction request to /mxo-click
using the same logic as is available automatically.
/mxo-click
Interaction request in Medallia Experience Orchestration, to capture the appropriate Attributes and Activities.