deeplink returned by getAttributionData() and sends it to your backend.
Your app is responsible for creating referral codes, validating them, and applying rewards.
Before you start
- Configure a Linkrunner subdomain, such as
get.example.com. - Set up deep linking for your app.
- Choose one query parameter name, such as
referrer, and use it consistently.
1. Create a referral link
Add the referring user’s code or ID to your Linkrunner subdomain:You do not need to create a campaign to pass a referral code. Direct subdomain links do not appear in campaign reporting.
2. Share the link
Let the referring user share the complete link. Keep thereferrer parameter intact through any redirect or URL shortener.
When the recipient opens the link, Linkrunner sends them to the app or store. After install, the original URL is available in getAttributionData():
3. Read the referral code
CallgetAttributionData() after the Linkrunner SDK is initialized. Parse the returned deeplink and read the referrer query parameter.
- Android
- iOS
- React Native
- Flutter
4. Record the referral
Send the referral code and the recipient’s user ID to your backend. Validate the relationship and record it before applying a reward. At a minimum, reject:- Invalid or expired codes
- Self-referrals
- A recipient using more than one referral code
- The same qualifying event being rewarded twice
Add campaign reporting
If you also need click and install reporting in Linkrunner, append the referral parameter to a generated campaign link instead of using the subdomain directly.Testing
- Create a referral link with a test code.
- Uninstall the app from a real device.
- Open the referral link, then install and open the app.
- Confirm that
getAttributionData()returns the link indeeplink. - Confirm that your app extracts the referral code.
- Sign up and confirm that your backend records the correct referrer and recipient.
Troubleshooting
deeplink is null. Confirm that the SDK was initialized before calling getAttributionData() and that the app was installed through the referral link.
The referral parameter is missing. Open the final URL before the store redirect and confirm that no redirect or URL shortener removed it.
The previous referral code is returned. Uninstall the app before testing another link. Attribution data is cached from the first install.
The referral is not visible in campaign reporting. Direct subdomain links are not associated with a campaign. Use a generated campaign link when you need dashboard reporting.
The code is present but no referral is recorded. Check the app-to-backend request and your referral validation logic. Linkrunner forwards the code but does not apply referral rules or rewards.
Need help? Contact support@linkrunner.io