OneLink triggers an app to open at the deeplink 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 deeplink?
If this is a new install AppsFlyer uses the
receive conversion data(deferred deeplinking).
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:
onAppOpenAttribution 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:
>(void) onAppOpenAttribution:(NSDictionary*) attributionData; ///iOS
>void onAppOpenAttribution(Map<String,String> attributionData); //android
- 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.
- AppsFlyer sends the deeplink data to the servers for re-targeting attribution purposes.