Skip to content

Commit

Permalink
update link resolution chapter in README
Browse files Browse the repository at this point in the history
  • Loading branch information
uerceg committed May 12, 2021
1 parent b2f998c commit f8f5ef9
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -732,21 +732,30 @@ Adjust.appWillOpenUrl(deeplinkUrl);

### <a id="link-resolution"></a>Link resolution

If you are serving deep links from an Email Service Provider (ESP) and need to track clicks through a custom tracking link, you can use the `resolveLink` method of the `LinkResolution` class to resolve the link. This ensures that you record the interaction with your email tracking campaigns when a deep link is opened in your application.
If you are serving deep links from an Email Service Provider (ESP) and need to track clicks through a custom tracking link, you can use the `resolveLink` method of the `AdjustLinkResolution` class to resolve the link. This ensures that you record the interaction with your email tracking campaigns when a deep link is opened in your application.

The `resolveLink` method takes the following parameters:

- `url` - the deep link that opened the application
- `resolveUrlSuffixArray` - the custom domains of the configured campaigns that need to be resolved
- `linkResolutionCallback` - the callback that will contain the final URL
- `adjustLinkResolutionCallback` - the callback that will contain the final URL

If the link received does not belong to any of the domains specified in the `resolveUrlSuffixArray`, the callback will forward the deep link URL as is. If the link does contain one of the domains specified, the SDK will attempt to resolve the link and return the resulting deep link to the `callback` parameter. The returned deep link can also be reattributed in the Adjust SDK using the `Adjust.appWillOpenUrl` method.

> **Note**: The SDK will automatically follow up to ten redirects when attempting to resolve the URL. It will return the latest URL it has followed as the `callback` URL, meaning that if there are more than ten redirects to follow the **tenth redirect URL** will be returned.
**Example**


```java
AdjustLinkResolution.resolveLink(url,
new String[]{"example.com"},
new AdjustLinkResolution.AdjustLinkResolutionCallback() {
@Override
public void resolvedLinkCallback(Uri resolvedLink) {
Adjust.appWillOpenUrl(resolvedLink, getApplicationContext());
}
});
```

## Event tracking

Expand Down

0 comments on commit f8f5ef9

Please sign in to comment.