At a glance: Create a template to form the basis of the redirection logic for all OneLink links that you create for your various marketing campaigns. A template is required for creating links and end-user experiences.
OneLink templates
A OneLink template:
- Is not a clickable link for your end-users; it is the foundation for generating many custom links. Usually, you only need one template per app (outside of testing) to generate as many links as you want for all your different advertising campaigns.
- Is where you record your decisions on how to redirect users based on their device platform and on whether or not they have your app installed.
- Represents the routing logic at the core of all the OneLink links you create for your various marketing campaigns. This includes the redirection settings for:
- New users without your app installed: To the correct app store or web URL
- Existing users with your app already installed: Opening the app via Android App Links, iOS Universal Links, or URI schemes. This involves some developer work to set up.
- Note: Redirection settings for website or app store can be overridden on the link level.
How to create OneLink templates
Who's involved
|
Prerequisites
|
Time required Approximately 1.5 hours, working together with your Android/iOS developers. |
Outcome
|
Create a OneLink template with redirection logic for new app users
To create a OneLink template:
- In AppsFlyer, from the side menu, select Engage > OneLink management.
The OneLink suite is an account-level feature, which lets you create OneLink templates and their custom links for all your apps.
Note: If you don't have any templates created, an onboarding wizard opens. Follow the directions in the wizard and disregard the rest of this procedure. - Click the menu icon > Add OneLink template.
The OneLink template setup page opens.
- In the OneLink template name field, enter a name.
Note
- A good OneLink template name includes the name of the app (for example feed_me) or the use case or experience represented by the OneLink (for example pre_launch_landing_page).
- The name should not include the campaign or channel name or media source (since this isn't the actual end-user link, just the underlying template to create many links), or the name of the platform (Android, iOS, since multiple platforms are usually the reason for using a OneLink template in the first place).
- This template name is only used internally. It doesn't affect your marketing attribution data and is not seen by users.
- In the Subdomain field, enter your subdomain name.
- Choose a subdomain that matches your brand. For example, if your website is www.abcd.com choose abcd as your subdomain.
-
Users will see this subdomain as part of the link URL. For example:
https://abcd.onelink.me/RPsv/37e5cd36
. - The subdomain can’t be changed once custom links are created based on this template.
- Only use lower-case letters, digits, or hyphen (-).
- OneLink also supports fully branded domains, that can help you improve campaign performance and increase brand exposure. Learn more
- Select your Android app, iOS app, or both.
-
Set where to redirect users When app isn't installed.
- If you've selected an Android app and an iOS app, the template is by default configured to send new app users to the correct app store.
- If you've selected only one app, Android or iOS, the template is configured to send ALL users (iOS and Android, new and existing) to the single defined destination.
- If you select an Android app that isn't in Google Play, you must enter a URL to which Android users are redirected.
- [Optional] Redirect to third-party app stores if the app is in other stores besides Google Play. Make sure the app in the other stores has the same package name as the Android app selected in your OneLink template.
- [Optional] Change to a different URL: In some cases, you may prefer to take new users to a mobile web experience instead of directly to the app store (or your app may not be listed in the store). To implement, enter that URL in the URL field. Note: If you set both a third-party redirection and a different URL, the default redirection is to the third-party app store.
- [Optional] Turn on Display App Clip for users with Private Relay (available on iOS 14+). Learn more about App Clips.
- Skip When app is installed. This is discussed in the next procedure.
-
[Optional] Change destination for When link is clicked on desktop.
- In some cases, your link might be clicked on a desktop computer, especially if it is sent via email or social media. If you expect a lot of desktop traffic to your link, you might want to send those users to a landing page or the main website homepage, or a page where they can request an SMS link on their phone, instead of the correct app store.
-
By default, desktop users are redirected to a web version of the App Store or the Google Play store - depending on the apps set on the template.
- To change the default store option, select "Desktop web URL" and add the relevant web store URL. Make sure to add the store domain to the redirect allowlist.
-
[Optional] Select apps from other platforms
If you have a dedicated app version for the following:- Windows phone: Turn on the toggle and select app or Change to a different URL.
- iPad: Turn on the toggle and select iPad app
- Amazon Kindle Fire: Turn on the toggle and add the Amazon store ASIN or app page URL.
- Click Save OneLink template (Update OneLink template for edited templates).
Your OneLink template is now created and can be used to create many different clickable links (see OneLink links and experiences).
Add redirection logic for existing app users
Existing app users usually expect to be redirected directly into the app, not to an app store or web page. 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 fail to open the app either because they don't work or aren't set up
- iOS: Limited fallback capabilities for when Universal Links fail to 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.
To add redirection logic for existing app users to your OneLink template:
- In AppsFlyer, from the side menu, select Engage > OneLink management.
- Select the OneLink template you want to edit.
- Click the menu icon (⋮), then click Edit OneLink template.
- 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.
- It can take up to 1 hour for OneLink template updates to take effect.
Customize QR codes
You can customize the QR codes generated via OneLink by:
- Adding your logo to the QR code
- Changing the color of the QR code.
Note: QR code customization occurs at the template level; not at the individual link level. Therefore, customizations affect all QR codes based on the edited template.
To customize your QR code:
- In AppsFlyer, from the side menu, select Engage > OneLink Custom Links.
- Hover over the Actions icon of the template you want to edit and click Customize QR code.
The QR code editor opens. -
Enter the URL where your logo is hosted. For example: https://yourbrand.com/logo.png.
Logo requirements:- PNG or JPG format
- Square or circular with a transparent background
- Minimum dimensions 400 x 400 px
- For printing, use maximum image resolution
- Set the QR code color.
- Click Save.
Traits and limitations
Trait | Remarks |
---|---|
Agencies | Agencies cannot create OneLink templates and links. |
Add/edit OneLink templates | Account users require permission to add and edit OneLink templates. |
OneLink templates | Up to 600 OneLink templates per account. |
Desktop | When you set the OneLink URL or template to redirect desktop users to a different URL, the web URL is added to the link in the af_web_dp parameter. When the link contains af_web_dp , AppsFlyer does not register a click when it comes from a desktop. |
Redirect to third-party app stores |
Multiple app stores can be set on the OneLink template only if the app package name is the same for all app stores. To learn more about OneLink redirection to third-party Android app stores see here. Note:
|
Updating a template | Changes to the configuration of a OneLink template take up to 1 hour to apply. |
URI scheme | See here. |
Got a question about OneLink templates? Check out our FAQ!
Next step
Follow the instructions to create OneLink links based on your template.