OneLink™ 2/4: Sending existing users to open your app

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. 

Part1_fade_180X408.png Part2_180X408.png Part3_fade_180X408.png Part4_fade_180X408.png

Scope of work

Who's involved

Note: This guide indicates when and how the marketer needs to involve the developers.


Time required

Approximately 1.5 hours, working together with your mobile developers.


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.


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.


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 schemes
    • URI schemes are one of the oldest and most common ways of opening an app from a link. 
    • A URI scheme 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.
    • The URI scheme must be the same for iOS and Android, but they are set up differently. 
    • They are an effective fallback method for when Universal or App Links don't work. Also, it's the only way to open your app from a link on a device with below Android 6 or below iOS 9.

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:

  1. In the AppsFlyer dashboard, go to Engagement & deep linking > OneLink Custom Links.
  2. Hover over the OneLink template you created using the previous guide and click the Pen icon to edit the OneLink template.
  3. Click the Redirecting & deep linking tab.
  4. Scroll down to When app is installed.

  5. Follow the instructions for iOS, Android, and fallback setup:
    iOS Universal Links Android App Links URI scheme

    Universal Links take the format of regular web links (e.g. or 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:

    1. 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).
    2. In the OneLink template page click Change to launch the app using Universal Links.
    3. In the new window, select Launch the app using Universal Links.
    4. In the Team ID field, enter the team ID provided by the developer.
    5. If the app is not published, also enter the Bundle Identifier.
    6. Click Save changes.
  6. Click Update OneLink template.

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:

  1. In the AppsFlyer dashboard, go to Engagement & deep linking > OneLink Custom Links.
  2. Click the selected OneLink template.
  3. From the list, select the Custom link you created in the previous guide
  4. In the Attribution section, activate Retargeting campaign.
  5. 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:

  1. In the AppsFlyer dashboard, go to Configuration > App Settings.
  2. In the Attribution section, enable Retargeting campaign measurement.
  3. Click Save settings.

3. Creating Social 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 creating a social media apps 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:

  • Instagram
  • Facebook
  • Pinterest for iOS
  • Snapchat
  • Twitter
  • WeChat

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).


The social app landing page only supports OneLink short URL.

To use the social app landing page: 

  1. Configure the landing page as described in the following section. 
  2. To fully support deep linking on both iOS and Android, make sure the URI fallback is configured for the custom link. Also, add af_force_deeplink=true to the attribution link.
  3. Record the generated OneLink short URL.
    The social media apps landing page does not work with long OneLink URLs.
  4. 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:

  1. In your Custom link setup, click the Social apps landing page tab.


  2. Click Create landing page.
    A window to choose a landing page template opens.
  3. To choose a landing page template, hover over the selected template and click Create.
    Tip: hover over the mceclip0.png icon of a template to see in which cases it should be used.
  4. 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.
  5. Replace all template images with your own images.
    • Enter image URLs including the extension, e.g.
    • 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 300 KB 72 1:1
      Flyer/poster/blurry 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.

  6. To review the landing page creative, click Review.
    If changes are needed, click Back to editor.

  7. To save your landing page, click Done.
    Important: New/updated landing page creatives only apply after generating/updating the custom link.

4. Testing


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:

  1. In the AppsFlyer dashboard, go to Engagement & deep linking > OneLink Custom Links.
  2. Click the selected OneLink template.
  3. From the list, select the Custom link.
  4. Hover over the Actions icon of the link you want to test and click Get URL
  5. 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.
  6. Click the link on your mobile device.
    The app should open to its home screen.
  7. 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.

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.
  • 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 iOS 12.3.1 app launching issue?

When a OneLink that has af_force_deeplink=true is opened in iOS 12.3.1, the following logic applies:

  • A dialog is shown asking the user if the app installed:
    • If the user chooses OK (app is installed), AppsFlyer attempts to open the app using URI scheme
    • If the user chooses Cancel (app is not installed), AppsFlyer redirects the user to the app store
    • If the user chooses OK but the app is not installed, an error message is shown:


Are URI schemes usable with Amazon devices?

No. Currently, direct app launching and deep linking via URI-schemes is not supported on Amazon 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&param2=b).

The best practice for adding custom parameters, is via the custom link setup page


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

Deep linking with iOS Universal Links and Android App Links requires associating your OneLink domain (e.g. 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,, or non-AppsFlyer branded links. 

To make sure a wrapped or shortened link redirects work properly: 

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

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.

Universal Links FAQ

iOS: Tapping the link always redirects to the app store

On iOS 9 & 10 (removed from iOS 11) there is an option to ignore deep linking. When an app is opened by Universal Links, iOS shows a deep link bypass link in the top right corner which sets that link to be opened without deep linking.
This is a per-app setting that is saved on each unique device. The setting is preserved even if you delete the app and reinstall it.
The only way to reverse this is by re-enabling Universal Link behavior for that app on your device.
There are a couple of ways to do this:
To reset this setting paste the OneLink into Notes or iMessage (or some other app that supports Universal Links) and long-press on it. You'll see an 'Open in [App]' option. Select it, and after that, all Universal Links for that app will work again. 


Select Open in your app (e.g. open in LoginBox).
Deep linking is now restored.

I performed a long tap, but I don't see the "Open in your app" option!

In this case the app was not configured properly for Universal Links. Check the following:
  • iOS apps are built with a provisioning file (similar to a license). This file is generated on Apple's developer console, and should be enabled for Universal Links.
  • On Xcode - make sure Associate Domains is enabled on the Capabilities tab and includes the OneLink domain for the app.
  • Make sure the team ID of the app matches the one entered on the OneLink templates page.

Next step

Follow the instructions in guide 3/4 to deep link existing app users to specific content inside your app.

Was this article helpful?