An AppsFlyer attribution link records a click or impression for a specific media source and campaign, so the install that follows can be credited correctly. There are two main forms: OneLink links, which use your branded subdomain and can deep-link users into the app across platforms, and direct links on app.appsflyer.com for a single app. Both carry the same core parameters.
The two link formats
https://{subdomain}.onelink.me/{templateID}?pid={media_source}&c={campaign}
https://app.appsflyer.com/{app_id}?pid={media_source}&c={campaign}
- OneLink works for Android and iOS from one URL, routes users to the right store or into the app if installed, and supports deep linking.
- Direct links use the app ID (Android package name or
id+ iOS App Store ID) and are often used by ad networks for one platform.
AppsFlyer accepts engagement traffic over HTTPS only.
The parameters that matter
| Parameter | Meaning | Notes |
|---|---|---|
pid | Media source | For integrated partners this is a fixed partner ID (often ending in _int). Do not change it. Max 150 characters. |
c | Campaign name | Max 100 characters. Keep names consistent. |
af_siteid | Publisher / site ID | Identifies the sub-publisher. Max 24 characters. |
af_sub_siteid | Sub-site ID | Second level of publisher detail. |
af_c_id | Campaign ID | Useful when names change. |
af_adset, af_ad | Ad set and ad names | For creative-level reporting. |
af_sub1 … af_sub5 | Custom values | Free fields, often used for click IDs. |
clickid | Partner click ID | Returned in postbacks so the partner can match conversions. |
af_click_lookback | Click lookback window | For example 7d, within allowed limits. |
af_prt | Agency account ID | Identifies the agency running the campaign. |
deep_link_value, deep_link_sub1… | Deep link data | Tells the app which screen or content to open. |
Parameter names are not case sensitive, but values should be consistent — Summer_Sale and summer_sale are different campaigns in reports.
Creating a link for an integrated partner
- Open the partner in your integrations (Collaborate / partner marketplace).
- Activate it and configure postbacks.
- Open the partner's attribution link tab. AppsFlyer generates the link with the partner's
pidand the partner's macros already in place — for exampleclickid={click_id}andaf_siteid={pub_id}, using the partner's macro names. - Add your campaign name (
c) or let the partner fill it. - Copy the click URL (and impression URL if the partner supports view-through) and share it with the partner.
The partner's platform replaces its macros with real values on every click.
Creating a OneLink for your own channels
For owned media, influencers, email, QR codes or web-to-app banners:
- Create a OneLink template (one per app or app pair): set the subdomain, store fallbacks and deep linking behaviour.
- Create links from the template, choosing a media source name (for example
email,influencer,qr) and campaign. - Add
deep_link_valueif users should land on a specific screen. - Shorten the link if needed and test it on Android and iOS.
Use your own media source names for owned channels; reserve integrated partner pid values for the partners themselves.
Links for agencies
When an agency runs a campaign, the link includes the agency's account ID in af_prt. The advertiser must allow the agency and, since 2024, ad networks must allowlist agencies that run through their integration — see AppsFlyer for agencies and advertisers.
Testing a link
- Register your test device in AppsFlyer.
- Click the link on the device and install the app fresh.
- Open the app and check the install in the dashboard under the right media source, campaign and site ID.
- If you use deep linking, check that the app opens the right screen both for new installs (deferred deep linking) and existing users.
Common mistakes
- Changing an integrated partner's
pid— the install will not be attributed to that partner and postbacks will not fire. - Spaces or special characters in campaign names — URL-encode them or use underscores.
- Missing click ID — the partner cannot match conversions; always pass it in the field the partner expects.
- HTTP instead of HTTPS.
- Using one link for every partner — every source needs its own
pidor media source name.
FAQ
What is pid in AppsFlyer?
pid is the media source parameter. For integrated partners it is a fixed ID assigned by AppsFlyer; for owned channels you choose a name.
What is the difference between OneLink and a regular attribution link?
OneLink is a branded, cross-platform link with routing and deep linking. A regular (direct) link points to one app on one platform. Both support attribution parameters.
How do I pass a click ID in an AppsFlyer link?
Use the partner's clickid parameter (or an af_sub field if agreed) and fill it with the partner's or tracker's click ID macro.
Can I use AppsFlyer links for web-to-app campaigns?
Yes. OneLink is designed for routing web, email, social and offline traffic into the app and attributing the resulting installs.
Sources
- AppsFlyer — About link structure and parameters (opens in a new tab)
- AppsFlyer Developer Hub — deep linking (opens in a new tab)
- Awin — AppsFlyer integration notes (opens in a new tab)
Published 25 October 2026 by the ClickSpero Editorial Team. Platform features, fees and policies change often — check the provider’s current terms before you rely on a number. Third-party names are trademarks of their owners; no endorsement is implied.