Appearance
Referral Code Tracking
Track referral sources and campaign parameters using query strings on your Linkrunner subdomain
Overview
Add query parameters to your Linkrunner subdomain URL to track referrals, campaigns, or custom data. When users click your link and install the app, retrieve these parameters through getAttributionData().
Works for both Android & iOS
Quick Example
Create a link with query parameters:
get.yourdomain.com?referrer=user_123&campaign=summer2024When the user installs your app, call getAttributionData() to get the full URL and parse the parameters.
Setup
1. Configure Your Subdomain
- Go to Linkrunner Settings → Domains
- Add your subdomain (e.g.,
get.yourdomain.com) - Complete domain verification
No need to create campaigns in the dashboard. Just add query parameters to your subdomain URL and they'll be automatically captured.
2. Create Your Links
Basic referral:
get.yourdomain.com?referrer=user_1Multiple parameters:
get.yourdomain.com?referrer=user_1&campaign=summer2024&source=instagramWith deep linking:
get.yourdomain.com/product/123?referrer=user_456Retrieving Data
Call getAttributionData() early in your app lifecycle, then parse the deeplink field to extract your query parameters.
Use android.net.Uri to parse the URL and getQueryParameter() to extract values.
Common Use Cases
Referral programs: ?referrer=user_12345
Influencer tracking: ?influencer=john_doe&platform=youtube
Campaign attribution: ?campaign=summer_sale&source=instagram
Promo codes: ?promo=SAVE20&referrer=email_campaign
Testing
- Create a test link with query parameters
- Uninstall your app completely
- Click the link and install from the store
- Verify parameters in
getAttributionData()
Always uninstall before testing. Attribution data is cached from the first install.
Troubleshooting
No parameters showing up? Verify your subdomain is configured correctly in the dashboard and that the app was installed via your link (not directly from the store).
Need help? Contact support@linkrunner.io