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. Note: Samsung OS can't open apps using Android App Links.
- URI scheme:
- Fallback method:
- Android: URI scheme is an effective fallback method for when Android App Links don't open the app either because they don't work or aren't set up.
- iOS: Limited fallback capabilities for when Universal Links don't open the app either because they don't work or aren't set up. Learn more
- Primary method for opening apps on Samsung devices.
- 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.
Prerequisites: Either be an AppsFlyer admin user, or have permission to add/edit OneLink templates.
To update the OneLink template:
- In the AppsFlyer dashboard, go to Experiences & deep linking > OneLink.
- Hover over the OneLink template you created using the previous guide and click the Edit 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, for example, PF23MIWNTW).
- If the app is not yet published, the developer must also give you the Bundle Identifier (for example, 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
- 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, for example, 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.
- 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.
- It can take up to 1 hour for OneLink template updates to take effect.
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 Experiences & deep linking > OneLink.
- 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 Deep linking & redirections section and Direct 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 app 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.
With a social app landing page, users who click ads in social media apps are 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 app 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 app landing page can be used with the following social media apps:
- Facebook/Facebook Messenger (Note: For Facebook and Facebook Messenger, if both URI scheme and a Social app landing page are set up, the Social app landing page doesn't display.)
- Pinterest for iOS
- Slack
- 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 linking 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 app 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, for example,
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, for example,
- 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 Experiences & deep linking > OneLink.
- 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.