Excluding identity transfer links
The SDK will append a tid
URL query parameter to all links opened from a mobile app. To limit this behavior to a specific set of links, exclude the links to which the SDK should not append a tid
, call the method identityTransferConfiguration
and passing your links as shown below:
// This example shows how to exclude identity transfer links.
NSError *error;
NSMutableArray<MXOIdentityTransferUriMatcher *> *excludeList = [@[] mutableCopy];
// Example with MXOIdentityTransferUriMatcher(withUrl:)
MXOIdentityTransferUriMatcher *google = [MXOIdentityTransferUriMatcher initWithUrl:[NSURL URLWithString:@"www.google.com"] error:&error];
[excludeList addObject:google];
// Example with MXOIdentityTransferUriMatcher(withRegex:)
MXOIdentityTransferUriMatcher *wiki = [MXOIdentityTransferUriMatcher initWithRegex:[NSRegularExpression regularExpressionWithPattern:@".*\\.wikipedia\\.com" options:0 error:nil] error:&error];
[excludeList addObject:wiki];
MedalliaMXO.identityTransferConfiguration = [MXOIdentityTransferConfiguration initWithBuilder:^(MXOIdentityTransferConfigurationBuilder * _Nonnull builder) {
builder.excludeList = [excludeList copy];
}];
// This example shows how to edit the identity transfer configuration.
NSError *error;
NSURL *newlink = [NSURL URLWithString:@"www.newlink.com"];
MXOIdentityTransferUriMatcher *excludeNewlink = [MXOIdentityTransferUriMatcher initWithUrl:newlink error:&error];
MXOIdentityTransferConfigurationBuilder *builder = MedalliaMXO.identityTransferConfiguration.builder ? MedalliaMXO.identityTransferConfiguration.builder : [MXOIdentityTransferConfigurationBuilder new];
NSMutableArray<MXOIdentityTransferUriMatcher *> *excludeList = builder.excludeList ? [builder.excludeList mutableCopy] : [@[] mutableCopy];
[excludeList addObject:excludeNewlink];
builder.excludeList = [excludeList mutableCopy];
MedalliaMXO.identityTransferConfiguration = [builder build];
If a link is excluded, a tid
URL query parameter will be appended to all other links but the excluded link, but is superseded by any included identity transfer links.