At a glance: Use this guide to create a custom link to retarget your existing app users and send them directly into the app. These users are attributed using retargeting attribution.
![]() |
![]() |
![]() |
![]() |
Scope of work
Who's involved
Note: This guide indicates when and how the marketer needs to involve the developers. |
Prerequisites
|
Time required Approximately 1.5 hours, working together with your mobile developers. |
Outcome During retargeting campaigns, existing app users who click your link are sent directly into the app. Non-users clicking the custom link are redirected to the correct app store per their device. Clicks (and future in-app events) are correctly attributed using retargeting. |
Example
The grocery delivery app Feed Me (from the previous guide's example) has many users who have become inactive for more than 30 days. Mark the marketer would like to encourage these existing app users to return to the app.
Mark decides to reach these existing app users by posting to their Facebook community.
The post includes a link powered by OneLink, configured (with the help of Andrea the Android developer, and Yossi the iOS developer) to:
- Directly open the app for existing users (who have the app installed). When the app opens, users will arrive at the home screen of Feed Me, not to specific content. (We cover deep linking to specific content in the next guide).
- Send new users without the app installed to the appropriate app store or landing page, based on their device.
Procedures
Complete the following procedures to set up a custom link that will send existing iOS or Android app users directly into the app.
1. Updating OneLink template
There are three technologies available to open the app directly after a click:
- iOS Universal Links: Works with iOS 9 and up, and provides a smooth, secure experience when opening your app.
- Android App Links: Works with Android 6 and up, and provides a smooth, secure experience when opening your app.
- URI scheme:
- Fallback method:
- Android: URI scheme is an effective fallback method for when Android App Links fail to open the app.
- iOS: Limited fallback capabilities for when Universal Links fail to open the app. Learn more
- Is an address, that when accessed, opens your app if it's installed. They are similar to website links, but open apps instead of websites.
- Must be the same for iOS and Android.
- Fallback method:
For the best user experience, security, and device coverage, we recommend enabling as many technologies as possible. If you enable all link technologies, OneLink will automatically apply the best method for each user.
To update the OneLink template:
- In the AppsFlyer dashboard, go to Engagement & deep linking > OneLink Custom Links.
- Hover over the OneLink template you created using the previous guide and click the Pen icon to edit the OneLink template.
- Click the Redirecting & deep linking tab.
- Scroll down to When app is installed.
- Follow the instructions for iOS, Android, and fallback setup:
Universal Links take the format of regular web links (e.g. https://yourbrand.onelink.me or https://www.yourbrand.com) and thus require setting a subdomain (covered in the previous guide). OneLink also supports fully branded domains, but that isn't necessary to complete this guide.
To launch the app using Universal Links:
- Contact your iOS developer:
- Give them the subdomain for this OneLink template.
- Tell them to follow these instructions.
- The developer returns to you with the Team ID (also called Apple App ID Prefix, e.g., PF23MIWNTW).
- If the app is not yet published, the developer must also give you the Bundle Identifier (e.g., com.myapp.something).
- In the OneLink template page click Change to launch the app using Universal Links.
- In the new window, select Launch the app using Universal Links.
- In the Team ID field, enter the team ID provided by the developer.
- If the app is not published, also enter the Bundle Identifier.
- Click Save changes.
App Links take the format of regular web links (e.g. https://yourbrand.onelink.me or https://www.yourbrand.com) and thus require setting a subdomain (covered in the previous guide). OneLink also supports fully branded domains, but that isn't necessary to complete this guide.
Before you begin:
Record the subdomain you chose for this OneLink template.
To launch the app using Android App Links:
- Contact your Android developer:
Tell them to generate a SHA256 fingerprint by following these instructions.
The developer will come back to you with the SHA256 fingerprint. For example:DC:65:43:67:F3:BD:02:52:AC:B4:50:F1:74:54: 23:49:4D:49:6C:E6:DF:56:BD:CB:53:06:11:5B:C9:4E:5D:0C
- In the OneLink template page click Change to launch the app using App Links.
- In the new window, select Launch the app using App Links.
- In the SHA256 fingerprint field, enter the SHA256 fingerprint provided by the developer.
An auto-generated intent-filter code appears. - Contact your Android developer:
Give them the auto-generated intent-filter code.
Tell them to follow these instructions and confirm completion.
The URI scheme mainly serves as a fallback for both iOS and Android users, and so must be the same at both.
To set the Android and iOS URI fallback:
- Contact your iOS AND Android developers and decide on a URI scheme. For example:
feedmeapp://
Tip
Use a URI scheme that is as unique as possible to your app and brand to avoid coincidental overlap with other apps in the ecosystem. Overlap with other apps is an inherent issue in the nature of URI scheme protocol.
The URI scheme should not start with http or https.
- Tell the iOS developer to implement the URI scheme in their app by following these instructions.
AND
Tell the Android developer to implement the URI scheme in their app by following these instructions. - When done, the developer confirms the value of the URI scheme implemented. Expect it to look like:
exampleapp://
orexampleapp://home
orexampleapp://main
, etc. - In the OneLink template page click Add URI scheme to launch the app.
- Select Launch the app using URI scheme.
- Enter the URI scheme value.
- Click Save changes.
- Test the URI scheme (this can be done by you OR your developers):
- Go to this free public testing tool on both an iOS and an Android device that has your app installed.
- Tap the link generated by the tool.
If the URI scheme is correct, the app opens.
- Contact your iOS developer:
- Click Update OneLink template.
Note
When you save or update your OneLink template, AppsFlyer automatically generates the AASA and/or Digital Asset Links JSON file to verify your app domain, and hosts it for you. This is critical for your Universal Links and App Links to work properly. You can test that your Universal Links and App Links are properly configured using the AppsFlyer link validator.
2. Enabling retargeting attribution for custom links
After updating the OneLink template, the custom attribution link (created using the previous guide) can be used to retarget and correctly attribute users with the app installed. When these users click the link, the app opens on their devices.
It is important to mark campaigns for existing users as retargeting campaigns. This enables you to see the re-engagements performed by users clicking on your custom link.
Existing users that click on non-retargeting links (UA) also launch the app, and have the same user experience. However, their re-engagements are recorded as regular sessions, which means it's impossible to measure the success of the owned media campaign.
To enable retargeting on the custom link:
- In the AppsFlyer dashboard, go to Engagement & deep linking > OneLink Custom Links.
- Click the selected OneLink template.
- From the list, select the Custom link you created in the previous guide.
- In the Attribution section, activate Retargeting campaign.
- [Optional] If you want to send NEW users to a landing page, instead of to the app store, go to the Redirecting & deep linking section and Redirect users to a different URL.
The custom Android and iOS URLs redirect new users to the landing page you specify. Note! If your OneLink template already has a set value for a custom URL, these custom link URLs override it. - Click Update link.
If Retargeting was never enabled for the app, you need to do it once (learn more).
To set Retargeting at the app level:
- In the AppsFlyer dashboard, go to Configuration > App Settings.
- In the Attribution section, enable Retargeting campaign measurement.
- Click Save settings.
3. Creating social media apps landing page
If your custom link is not intended for social media apps, you can skip directly to testing.
Social media apps may break the smooth experience of existing users using Universal Links or Android App Links. This can be overcome by:
- [Recommended] Creating a social media apps landing page.
When creating a social media app landing page, we recommend making sure you have a URI scheme configured. - [Alternative] Forcing the app to open using the
af_force_deeplink=true
parameter.
Note: This parameter is automatically enabled for Kakaotalk, Naver, Naver-Blog, Chrome, Weibo, and Twitter.
By using a social app landing page, users who click ads in social media apps are then redirected to an AppsFlyer-generated landing page. From there, they can be deep linked, or continue to install the app.
AppsFlyer provides a variety of social media apps landing page templates. Element positions in the templates are fixed, but the elements themselves are customizable, including background image or color, titles, texts, images, buttons, tags, and more.
The social media app landing page can be used with the following social media apps:
- Facebook Messenger
- Pinterest for iOS
- Snapchat
User experience
When the user engages with the CTA button in the landing page:
- If app is installed: the clicking user launches the app.
- If app is NOT installed: the user is taken to the relevant app store. Upon install, it's possible to defer deep link the user (explained in OneLink 4/4).
Note
The social app landing page only supports OneLink short URL.
To use the social app landing page:
- Configure the landing page as described in the following section.
- Record the generated OneLink short URL.
The social media apps landing page does not work with long OneLink URLs. - Post the OneLink short URL on the social app.
Attribution is determined based on your attribution settings.
To set up the Social apps landing page:
- In your Custom link setup, click the Social apps landing page tab.
- Click Create landing page.
A window to choose a landing page template opens.
- To choose a landing page template, hover over the selected template and click Create.
Tip: Hover over theicon of a template to see in which cases it should be used. Clustered Poster and ShowAndTell are recommended for Instagram.
- Customize all the elements in the landing page creative. To do so, select elements by name or click on them on the preview image.
Tip: Save your texts in case you replace the creative template. - Replace all template images with your own images.
- Enter image URLs including the extension, e.g.
https://example.com/image.png
. - Use one of the following file types: jpeg, jpg, png.
Note: webp format is not supported. - The recommendations for the images are:
Template image type Maximum image file size DPI Image ratio Collection 300 KB 72 16:9 (horizontal) - Trapeze
- Carousel
- ShowAndTell
300 KB 72 1:1 - Flyer
- Poster
- Blurry poster
- Clustered poster
300 KB 72 9:16 (vertical) - If one or more of the images isn't an exact URL, an error will display, and you will not be able to review the creative.
- Enter image URLs including the extension, e.g.
- To review the landing page creative, click Review.
If changes are needed, click Back to editor.
- To save your landing page, click Done.
Important: New/updated landing page creatives only apply after generating/updating the custom link.
4. Testing
Prerequisites:
An Android and/or iOS device with the app installed. Make sure it is the app source and version where the developer(s) made changes (and implemented Universal Links, App Links, and/or URI schemes).
To test your link:
- In the AppsFlyer dashboard, go to Engagement & deep linking > OneLink Custom Links.
- Click the selected OneLink template.
- From the list, select the Custom link.
- Hover over the Actions icon of the link you want to test and click Get URL.
- Send the short or long URL to your phone. You can either:
- Scan the QR code with your phone camera or QR scanner app.
- Email or WhatsApp yourself the link, and open it on your phone.
Note: Do not paste into iOS notes, or directly into a mobile browser. Often, the mobile operating system intentionally will not open the app in this context.
- Click the link on your mobile device.
The app should open to its home screen. - Go to the AppsFlyer Retargeting dashboard.
Look for a new click/re-engagement (app open) under your link's media source (e.g. test) and the campaign name you put in the URL.
Link not behaving as expected? Check out our troubleshooting guide.
If you completed all three procedures in this article, then well done! You have created a link you can send to existing app users to direct them into your app, and receive retargeting attribution data.
FAQs and Limitations
The following sections contain various FAQs and general explanations about OneLink and the app-launching methods.
URI schemes
Considerations for URI scheme naming
- Neither Apple or Google enforce unique naming for app schemes. Choose a scheme name unique to your brand to avoid conflicting schemes across different applications. A good scheme name could be your app bundle ID, i.e. com.company.app
- To enable OneLink to serve both iOS and Android, it is important that the same scheme is defined for both platforms. Here are instructions for iOS and Android.
What workaround is there for the iOS app-launching issue from social media apps?
Facebook and other social media apps sometimes block Universal Links from opening apps.
The recommended solution for app-launching issues from social media apps is Social apps landing pages.
If you do not want to use Social apps landing pages, add the af_force_deeplink=true
parameter to the URL. (This parameter is automatically enabled for Kakaotalk, Naver, Naver-Blog, Chrome, Weibo, and Twitter.)
This will attempt to force open the app using the URI scheme 100% of the time the link is clicked. This should be used only when you know the link is being sent to users that have the app. Otherwise, users will receive an error message.

Are URI schemes usable with iOS devices?
The best-supported way to open apps on iOS devices is by using Universal Links. Since 2016, there are considerable built-in OS limitations to using URI schemes as a fallback method for when iOS Universal Links fail to open the app. By default, URI schemes are only used as a fallback on iOS for the following browsers:
- Chrome
- Kakaotalk
- Naver
- Naver-Blog
For other browsers, including Safari, you can add the af_force_deeplink=true
parameter to the URL to use URI schemes as a fallback.
Note:
- URI schemes are unpredictable and therefore not supported by default.
af_force_deeplink=true
attempts to force open the app using the URI scheme 100% of the time the link is clicked. This should be used only when you know the link is being sent to users that have the app. Otherwise, users will receive an error message.
Are URI schemes usable with Amazon devices?
No. Currently, direct app launching and deep linking via URI schemes is not supported on Amazon devices.
Are URI schemes usable with Windows mobile devices?
No. Currently, direct app launching and deep linking via URI schemes is not supported on Windows mobile devices.
Can I add parameters to af_dp?
Yes, but it's not recommended.
af_dp can contain a URI value, and any parameters can be transferred as part of the path of the URI, e.g. af_dp=greatapp%3A%2F%2Fparam1%2Fparam2 (greatapp://param1/param2).
However, concatenating parameters to the value of af_dp after '?' is NOT recommended. The parameters may be discarded and not be available via conversion data or via other APIs.
Bad example: af_dp=greatapp%3A%2F%2F%3Fparam1%3Da%26param2%3Db (greatapp://?param1=a¶m2=b).
The best practice for adding custom parameters, is via the custom link setup page.
Important!
The following characters are not allowed [<>;(){}`']
Universal Links and Android App Links
Opening apps from browsers
Universal Links & Android App Links only work when clicked on. For example, when clicking a link on a web page or email. Pasting the link in the browser address bar doesn't launch the app.
In the past, it used to be supported by the browsers but is now deprecated due to browser security reasons.
Test by clicking on URLs, not by pasting them in the browser URL box.
Can the OneLink subdomain be changed?
The OneLink subdomain cannot be changed once there are custom links based on the template.
Changing the subdomain causes all the template's existing OneLink URLs to stop working.
As a workaround, we recommend to create a new OneLink template and custom links. Then slowly phase out the old OneLink template and the custom links that depend on it.
OneLink in social network apps
Not all apps, including social networks apps, fully support Universal links & Android App Links. In most cases of social apps, users clicking on OneLink URLs in unpaid posts may get a broken user-experience.
As this table shows, basic OneLink redirection should work with most social apps. However, app-launching and deep-linking require Universal Links or Android App Links and are mostly broken by social apps.
To solve this issue create the social apps landing page per custom link, as described above.
As a further safety method, make sure the custom link has a set URI scheme as a fallback.
Wrapping and shortening OneLink breaks iOS Universal Links and Android App Links
Deep linking with iOS Universal Links and Android App Links requires associating your OneLink domain (e.g. myapp.onelink.me) within the app's code. This domain is then recognized by the Operating System as a domain which invokes the app when clicked.
Any type of wrapping, shortening, or redirect to the link facing the user will break Universal or App Links. For example: using ESPs, bit.ly, or non-AppsFlyer branded links.
To wrap or shorten a link in a way that allows the redirection to work properly:
- Use AppsFlyer Branded Links (instead of external shorteners like bit.ly)
- Use a specific AppsFlyer ESP solution
- Use the URI scheme as a fallback, and add the following parameter to the link:
af_force_deeplink=true
.
Can OneLink work without the AppsFlyer SDK?
Actually, it can, but only partly.
Basic user redirection and app-launching work even if AppsFlyer SDK isn't integrated into the app yet. Smart Banners don't require the SDK either and also work fine without it.
If you need to convert mobile web visitors into mobile users fast and can't integrate the AppsFlyer SDK, it is possible to do so.
However, the absence of the SDK means that clicking users:
- Can't be deep-linked beyond the initial app launch
- No attribution data is recorded
- No user in-app actions are recorded
Do I need to release an app update for Universal Links and Android App Links to launch the app?
Yes. Whenever AndroidManifest.xml or iOS Associated Domains are updated (as they are when you implement Universal Links or Android App Links to open the app for existing users), you need to upload the new version of the app to the relevant app store. For this reason, if you want to minimize app updates, do all the dev-related changes required in this guide—and parts 3 and 4—at one time.
Android App Links FAQ
Bypassing app selection dialog
If you see the app selection dialog when testing your OneLinks, make sure to sign your app even if it's a debug app. The certificate that you use to sign the app with, is the same certificate that you use to generate the SHA256 fingerprint when configuring OneLink for App Links.
Testing FAQ
How can I A/B test the Social apps landing page?
The Social apps landing page gives users a seamless app-launching experience when using OneLink in social network apps. You may be concerned that adding a step to the funnel decreases conversion rates. But the truth is that without the landing page, conversion rates are very low, as user journeys are mostly broken.
If you're not fully convinced yet, why not test it?
A/B test your custom link in Social media apps, with and without the Social apps landing page.
To A/B test the Social apps landing page:
- Create a OneLink custom link (called Link1) to use with social media apps. Don't set the Social apps landing page for this link.
- Add the af_adset attribution parameter.
- Add the af_ad attribution parameter with the value "no lp".
- Test link1 outside of social media apps, and verify the link works and launches your app correctly.
- Duplicate Link1 and call it Link2.
- Change the af_ad attribution parameter value to "using lp".
- Create the Social apps landing page for Link2 only.
- Publish 2 different posts in the same social media app, using Link1 and Link2.
Don't worry about the different number of clicks each link produces. The important KPI is the final conversion rate of each link. - Check the A/B test results after enough traffic is created.
- Go to the AppsFlyer overview dashboard and scroll down to the Aggregated performance report table.
- Link1 and Link2 have the same media source, campaign, and adset name. Drill down to the specific adset.
- Compare the conversion rates (and other KPIs) of users that clicked either Link1 or Link2.