At a glance: Create a link that sends new users who don't have your app to the relevant store or web page, depending on their platform. If the AppsFlyer SDK is installed on your app, the users are attributed to the correct source—including to your owned media, such as banners, emails, SMS campaigns, or QR codes on posters.
![]() |
![]() |
![]() |
![]() |
Scope of work
Who's involved Only the marketer is required. If the AppsFlyer SDK is already installed, you can complete this guide entirely using the AppsFlyer dashboard, without a developer making any changes to your app's code. |
Prerequisites
|
Time required Approximately 30 minutes |
Outcome
|
Example
Mark is the marketer of a successful grocery delivery service called "Feed Me". Mark targets his user-base phone numbers to download Feed Me's new mobile iOS and Android apps. An SMS campaign is planned, targeting registered users who have not yet installed the app. However, Mark doesn't know which users have Android or iOS devices.
To solve this, Mark sends the SMS containing a short URL powered by OneLink. When a user receives the SMS and clicks the link, it automatically directs them to the appropriate app store or landing page, where it's easy for them to install the app.
These new installs are attributed to the SMS campaign, enabling Mark to check the success of the SMS campaign in AppsFlyer.
Setup procedures
Complete the following procedures to set up a custom link that:
- Directs users to the correct app store or web page based on their device.
- Attributes the click/install to your owned media source.
1. Creating a OneLink template
A OneLink template represents the routing logic at the core of your links. A OneLink template is not a clickable link for your end-users; it is the foundation for generating many custom links. A OneLink template is where you record your decisions on how to redirect users, based on their platform, and on whether they have your app installed.
A single OneLink template can be the basis for creating many links, as we'll see later in this guide. It is rare to need more than one or two OneLink templates in the lifetime of an app (outside of testing).
Prerequisites: Either be an AppsFlyer admin user, or have permission to add/edit OneLink templates.
To create a OneLink template:
- In the AppsFlyer dashboard, go to Experiences & deep linking > OneLink Custom Links.
OneLink 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 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 links. Learn more
-
Select your Android app, iOS app, or both. This takes care of redirecting clicking users without your app to the correct app store.
- If you've selected an Android app and an iOS app, the template is configured to send new and existing users to their respective destinations.
- 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 is not 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.
- Skip When app is installed. This is discussed in the next guide.
- [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 relevant app store.
- By default, desktop users are redirected to your app's iOS App Store page, or to Google Play's app page, If an iOS app isn't defined.
- [optional] Select apps from other platforms
If you have a dedicated app version for the following:- Windows phone - activate toggle and select app or Change to a different URL.
- iPad - activate toggle and select iPad app
- Amazon Kindle Fire - activate toggle and add 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 the following section).
2. Creating a custom attribution link for users
The OneLink template is ready! Now it's time to add a custom link to attribute users to an owned media campaign. Setup the custom link to get the URL to share with your users.
To create a custom link based on the OneLink template:
- In the AppsFlyer dashboard, go to Experiences & deep linking > OneLink Custom Links.
- Select the OneLink template to add a custom link for:
- New template - Click Add custom link.
- Template with defined links - Click Add custom link or click on a Custom link name in the list to edit it.
The Custom link page opens.
- In the Short URL field, customize the short URL ID to be a specific value (for example, your brand), or leave the default value as it is.
- In the Attribution tab, you can select the parameters to attribute clicking users to a media source, campaign, channel, etc.
- Select a Campaign name (for example, summer 2020). This enables you to compare different campaigns under the same owned media source.
Note: For the purposes of getting started or testing your link, name the media source 'test' and name the campaign 'getting started guide'. - Click on one of the suggested Owned media sources (for example, SMS) or select Custom to set a different name. The selected name is the Media source name, under which all clicking users' data is collected. Read more about selecting a good custom media source name.
- Skip the Retargeting campaign toggle. We cover it in the following guide.
- Click Add parameter to add more parameters, such as Ad set name, Ad name, Channel, your own custom parameters, or 1-5 Subscriber parameters. This enables a more granular analysis of your marketing efforts. Read more about the additional parameters.
- [optional] Change the Click-through Lookback window value. Enable Customize lookback window to reveal the slider and set a Lookback window, 1-23 hours, or 1-30 days. If deactivated, the default value is 7 days.
- [optional] Set a fixed cost per install. Enable cost per install and select the currency and amount (a numeric ONLY value with up to 4 digits after the decimal point) representing what each new install costs you. This enables you to see the ROAS of your owned media campaigns.
- Select a Campaign name (for example, summer 2020). This enables you to compare different campaigns under the same owned media source.
- Skip the Deep linking & redirection and Social app landing page tabs.
They will become useful when we enable deep linking, in the next guide.
However, ONLY if you wish to redirect users to a different URL than the app page, you can do it in the Redirecting & deep linking tab by specifying custom Android and iOS URLs.
Note:- If your OneLink template already has a set value for a custom URL, these custom link URLs override it.
- If you have an active Redirect allowlist, ensure the domain of this URL is in the list.
- Click Generate Link.
A popup displays prompting you to name your link. - Enter a name for your custom link.
- Click Generate link.
A short URL and long URL are displayed, each with a corresponding QR code.
3. Testing
To test your link:
Prerequisites: A registered test device without the app.
- In the AppsFlyer dashboard, go to Experiences & deep linking > OneLink Custom Links.
- 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.
Depending on your platform, it should take you to the app store or landing page.
Note: A real click on a mobile device is needed. Javascript or 301/302 redirects can't trigger Universal Links and Android App Links. Even basic redirections fail with these methods on some browsers. - Download and launch the app.
- In the AppsFlyer Overview dashboard look for a new install.
Look for a new click and install under 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 congratulations! You have created a link you can send to all new users who do not have your app and direct them to the correct app store.
The following sections contain various FAQs and general explanations about OneLink.
Additional procedures
Create a custom impression URL
- Measure the impressions to clicks conversion rates of the ads you display.
- Receive attribution for clicks.
AppsFlyer detects the user's device platform and attributes the click to the correct source.
Prerequisites: A working OneLink custom link long URL. Short URLs are not supported.
Who is involved:
Marketer and web developer
To create impression URLs for measuring impressions only:
- In the AppsFlyer dashboard, go to Experiences & deep linking > OneLink Custom Links.
- Hover over the Actions icon of the link you want to test and click Get URL.
- Copy the OneLink long URL for editing.
Example:https://subdomain.onelink.me/j7rN?pid=email&c=Spring
- Replace the subdomain (or the entire Branded Domain, if you're using one) with 'impressions'.
Example:https://impressions.onelink.me/j7rN?pid=email&c=Spring
- Copy the impression URL and send it to your developer.
- Instruct your web developer to implement the impression URL in the website logic.
Now you have an impression URL, that can be used to count impressions on your website pages but can't attribute new installs. For view-through attribution, follow the next steps.
To use impression URLs for attribution:
- Prepare the impression URL as described in the earlier steps.
- Make sure view-through attribution is turned on.
- [Optional] If you wish to change the default 1-day view-through lookback window value, add the
af_viewthrough_lookback
parameter with the new value. For example,af_viewthrough_lookback=1d
. - Copy the impression URL and send it to your developer.
- Instruct your web developer to implement the impression URL in the website logic.
Full impression URL example:
https://impressions.onelink.me/j7rN?pid=email&c=Spring&af_viewthrough_lookback=1d&.sh
Create a social media preview
When a link is shared, open graph (OG) tags are used to generate a preview with a title, description, and image.
These OG tags may automatically be taken from the web URL or app store you are redirecting to. However, sometimes this method of generating a preview fails. Therefore, we recommend setting your social media previews in OneLink, either using the OneLink UI, or, for links not created in the OneLink UI, by adding OG tag parameters to your link.
The Social media preview feature is supported by the following platforms:
- Facebook (posts and DMs)
- Twitter (posts and DMs)
- iMessage
- LinkedIn (posts and DMs)
- Line
- Telegram
- Slack
- Signal
- KakaoTalk
- Discord
To create your own social media preview in the OneLink UI:
- In your OneLink custom link editor, go to the Share on social media section
- In the Social media preview section, enter a:
- Title
- Description
- Image URL
- Click Update link.
To add OG tag parameters to your link (if it was not created in the OneLink UI, but rather using OneLink API, bulk upload, or SDK user invite):
- Add the following required parameters:
- af_og_title
- af_og_description
- af_og_image
Note:
- You can add the OG tag parameters to your link outside the AppsFlyer UI.
- If you add separate OG tags for Twitter, they will override the regular AppsFlyer preview.
Customize QR code
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 the AppsFlyer dashboard, go to Experiences & deep linking > 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 |
---|---|
OneLink characters |
|
Posting OneLink URLs in web pages | Using target="_blank" in the HTML href tag does not result in redirection to Google Play or App Store. If the OneLink URL is placed inside an html a tag with the target="_blank" attribute, it opens a blank page in Chrome on Android and iOS. This affects OneLink functionality. Make sure that the a tag doesn't include the target attribute. |
Agencies |
|
Add/edit OneLink templates | Account users require permission to add and edit OneLink templates. |
OneLink templates | Up to 600 OneLink templates per account. |
Social media preview image | If the image type is not supported by the social media platform, it doesn't display. |
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. Note:
|
Next step
Follow the instructions in OneLink guide 2/4 to send existing app users who click your link directly to the app itself.