Implementing Deep Linking with OneLink


OneLink triggers an app to open at the deep link location by mentioning the scheme under the af_dp parameter, or the Universal Links for iOS9.


What happens in cases where the app has additional logic to apply? How can the app open with additional logic taken from the parameters on the deep link?


If this is a new install AppsFlyer uses the receive conversion data (deferred deep linking).

But what does AppsFlyer do in a similar situation when the app was triggered by OneLink?

Get conversion data is not relevant here, as it returns the original install data only.

The app developer must implement the callback onAppOpenAttribution called by our SDK. It returns the Onelink parameters used to trigger the app open. Then, you can parse the values and apply the logic to trigger the relevant app page.


You have an app installed on your mobile device which you are using to search for hotels in Bangkok. You find an ad for a hotel that you like, you click on the ad which contains the following OneLink:


 parses the above link so the app developer uses it with the logic to trigger the app to open at the Hotels in Bangkok page.


iOS9 has one entry point to the app, so if the business requirement is to use different app pages to trigger, using the onAppOpenAttribution is necessary to apply the additional logic taken from the Link parameters.

The relevant method for each platform, is as follows:

iOS Android
>(void) onAppOpenAttribution:(NSDictionary*) attributionData; ///iOS
  1. While get conversion data retrieves the attribution data from AppsFlyer's servers, the onAppOpenAttribution returns the click info with no call to AppsFlyer's servers. However, when using shortlinks, then onAppOpenAttribution does query AppsFlyer's servers to retrieve the original long link, rather than just providing the shortened link that the user clicked on.
  2. AppsFlyer sends the deep link data to the servers for retargeting attribution purposes.
Was this article helpful?
1 out of 3 found this helpful