Testing & Sandbox Mode
Test your Insert Affiliate integration thoroughly before going live. This guide covers sandbox testing, creating test affiliates, and debugging your integration.
Supported Testing Environments
You can fully test Insert Affiliate in the following environments:
- Local builds - Run your app directly from your development environment
- TestFlight (iOS) - Apple's beta testing platform
- Google Play Internal Testing - Closed or internal testing tracks
- Google Play Closed Testing - Limited audience beta testing
Attribution and purchases work across all of these environments and will appear on your Insert Affiliate dashboard in real-time.
Sandbox Transaction Labels
If you use RevenueCat for purchase verification, sandbox transactions are clearly labeled as such in your dashboard, making it easy to distinguish test purchases from real ones.
Creating Test Affiliates
You can easily create test affiliate accounts using email aliases. This allows you to test multiple affiliates without needing multiple email accounts.
Using Email Aliases
Most email providers support the + alias syntax:
Example: If your email is michael@insertaffiliate.com
You can create test affiliates with:
michael+testaffiliate1@insertaffiliate.commichael+testaffiliate2@insertaffiliate.commichael+ios-test@insertaffiliate.commichael+android-test@insertaffiliate.com
All emails will be delivered to your main inbox (michael@insertaffiliate.com), but Insert Affiliate treats each as a separate affiliate account.
Creating a Test Affiliate
- Go to Create Affiliate
- Select "Create Affiliate (Admin)"
- Enter your test email (e.g.,
yourname+test@example.com) - Create and paste an affiliate deep link
- Click Create Affiliate
Note the affiliate's short code - you'll use this for testing.
Testing Methods
There are two primary ways to test your integration:
Method 1: Short Code Testing (Recommended)
Testing with short codes is the fastest and most reliable way to verify your integration.
Why Short Codes?
Short code testing isolates Insert Affiliate from your deep linking platform, allowing you to:
- Verify Insert Affiliate integration independently
- Test without dealing with deep linking complexity
- Quickly iterate during development
- Identify whether issues are with Insert Affiliate or deep linking
How to Test with Short Codes
- Add short code input to your app - Implement a way to manually enter short codes (see Short Codes for implementation details)
- Enable verbose logging - Turn on SDK logging to see what's happening
- Run your app - Launch on a test device or simulator
- Enter the short code - Input your test affiliate's short code
- Verify attribution - Check logs to confirm the short code is stored
- Make a test purchase - Complete a sandbox transaction
- Check your dashboard - Verify the transaction appears in Insert Affiliate
Interpreting Results
✅ If attribution works with short codes but NOT deep links:
- The issue is with your deep linking platform integration
- Insert Affiliate is working correctly
- Focus debugging on deep link handling
❌ If attribution doesn't work with short codes:
- The issue is with your Insert Affiliate or purchase verification setup
- Follow the Troubleshooting guide
Method 2: Deep Link Testing
Once short code testing works, test the complete flow with deep links.
Testing Deep Links (App Already Installed)
- Build and install your app on a test device
- Click an affiliate's deep link (send it via email, message, or QR code)
- App should open with the affiliate identifier
- Verify attribution - Check logs to confirm the short code is stored
- Make a test purchase - Complete a sandbox transaction
- Check your dashboard - Verify the transaction appears
Testing Deep Links (App Not Installed - "Cold Start")
This tests the full user experience when someone clicks an affiliate link without having your app installed.
Standard Method:
- Uninstall your app from the test device
- Click the affiliate link - Should take you to the App Store/Play Store
- Install the app from the store
- Open the app - Attribution should work on first launch
- Make a test purchase - Complete a sandbox transaction
- Verify in dashboard - Check the transaction appears
Faster Method (Insert Links Only):
If you're using Insert Links, you can test cold start attribution without going through the app store:
- Uninstall your app
- Tap the affiliate link - You'll be taken to the App Store page
- Don't install from the store - Instead, install locally from Xcode/Android Studio
- Launch the locally-installed app
- If Insert Links is configured correctly, attribution will work exactly as if installed from the store
For other deep linking platforms, check their documentation for cold start testing capabilities.
Sandbox Purchases
iOS Sandbox Testing
Requirements:
- Sandbox Apple ID (created in App Store Connect)
- Logged into sandbox account on test device
- Test products configured in App Store Connect
Steps:
- Create a sandbox tester account in App Store Connect
- Sign out of your regular App Store account on your device
- Launch your app and attempt a purchase
- When prompted, sign in with your sandbox account
- Complete the test purchase (it's free)
- Verify the transaction appears in your Insert Affiliate dashboard
Note: Sandbox purchases on iOS are clearly marked in your dashboard if using RevenueCat.
Android Sandbox Testing
Requirements:
- License tester account added in Google Play Console
- Test products configured
- App uploaded to internal testing track (doesn't need to be reviewed)
Steps:
- Add your test email as a license tester in Google Play Console
- Install your app via internal testing track
- Make a test purchase (use a test credit card or it will be free)
- Complete the purchase
- Verify the transaction appears in your Insert Affiliate dashboard
Debugging Your Integration
Enable Verbose Logging
All Insert Affiliate SDKs support verbose logging. Enable this in your development builds to see:
- When deep links are received
- When short codes are stored
- When purchases are sent to Insert Affiliate
- Any errors or issues
Check your platform's SDK documentation for how to enable verbose logging.
Common Debugging Scenarios
Scenario 1: Short Codes Work, Deep Links Don't
Diagnosis: Issue with deep linking platform integration
Debug steps:
- Log the deep link URL your app receives on launch
- Verify it matches the format your deep linking platform expects
- Check that you're passing the link to Insert Affiliate SDK
- Review your deep linking platform's documentation
Scenario 2: Attribution Works, Purchases Don't Appear
Diagnosis: Issue with purchase verification integration
Debug steps:
- Verify webhook configuration (RevenueCat/Apphud/Iaptic)
- Check that affiliate identifier is being passed to purchase platform
- For RevenueCat: Verify
insert_affiliateattribute appears in RevenueCat dashboard - Review Troubleshooting guide
Scenario 3: Nothing Works
Diagnosis: Multiple issues or setup problems
Debug steps:
- Start with Quick Start guide
- Verify API key is correct in SDK initialization
- Check Insert Affiliate dashboard settings are configured
- Enable verbose logging
- Test with short codes first
- Follow complete Troubleshooting guide
Testing Checklist
Use this checklist to ensure thorough testing before launch:
Basic Integration Testing
- Short code attribution works
- Sandbox purchases appear in dashboard
- Purchase amounts are correct
- Verbose logging shows no errors
Deep Link Testing
- Deep links open the app when installed
- Deep links attribute correctly when app is installed
- Attribution works on first launch after install
- Cold start attribution works (link → store → install → launch)
Platform-Specific Testing
- Tested on iOS (if applicable)
- Tested on Android (if applicable)
Best Practices
During Development
- Always test with short codes first - Isolates issues
- Use verbose logging liberally - Helps catch issues early
- Test frequently - Don't wait until the end to test integration
- Test on real devices - Simulators can behave differently
Before Launch
- Complete the testing checklist - Ensure all scenarios are covered
- Test cold start attribution - Critical user experience
- Review your dashboard - Familiarize yourself with the data
After Launch
- Monitor initial transactions - Verify everything works in production
- Keep verbose logging available - Use debug builds if issues arise
Getting Help
If you encounter issues during testing:
- Check Troubleshooting - Step-by-step debugging guide
- Review platform documentation - Deep linking and purchase verification guides
- Contact support - Email michael@insertaffiliate.com or visit app.insertaffiliate.com/help
Next Steps
Once testing is complete:
- Launch to production - Deploy your fully-integrated app
- Create real affiliates - See Creating Affiliates
- Set up affiliate self-signup - Affiliate Self-Signup
- Configure commission rates - Setting Commission Rates
- Explore advanced features - Features & Tools
