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.com
  • michael+testaffiliate2@insertaffiliate.com
  • michael+ios-test@insertaffiliate.com
  • michael+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

  1. Go to Create Affiliate
  2. Select "Create Affiliate (Admin)"
  3. Enter your test email (e.g., yourname+test@example.com)
  4. Create and paste an affiliate deep link
  5. 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

  1. Add short code input to your app - Implement a way to manually enter short codes (see Short Codes for implementation details)
  2. Enable verbose logging - Turn on SDK logging to see what's happening
  3. Run your app - Launch on a test device or simulator
  4. Enter the short code - Input your test affiliate's short code
  5. Verify attribution - Check logs to confirm the short code is stored
  6. Make a test purchase - Complete a sandbox transaction
  7. 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)

  1. Build and install your app on a test device
  2. Click an affiliate's deep link (send it via email, message, or QR code)
  3. App should open with the affiliate identifier
  4. Verify attribution - Check logs to confirm the short code is stored
  5. Make a test purchase - Complete a sandbox transaction
  6. 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:

  1. Uninstall your app from the test device
  2. Click the affiliate link - Should take you to the App Store/Play Store
  3. Install the app from the store
  4. Open the app - Attribution should work on first launch
  5. Make a test purchase - Complete a sandbox transaction
  6. 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:

  1. Uninstall your app
  2. Tap the affiliate link - You'll be taken to the App Store page
  3. Don't install from the store - Instead, install locally from Xcode/Android Studio
  4. Launch the locally-installed app
  5. 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:

  1. Create a sandbox tester account in App Store Connect
  2. Sign out of your regular App Store account on your device
  3. Launch your app and attempt a purchase
  4. When prompted, sign in with your sandbox account
  5. Complete the test purchase (it's free)
  6. 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:

  1. Add your test email as a license tester in Google Play Console
  2. Install your app via internal testing track
  3. Make a test purchase (use a test credit card or it will be free)
  4. Complete the purchase
  5. 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:

  1. Log the deep link URL your app receives on launch
  2. Verify it matches the format your deep linking platform expects
  3. Check that you're passing the link to Insert Affiliate SDK
  4. Review your deep linking platform's documentation

Scenario 2: Attribution Works, Purchases Don't Appear

Diagnosis: Issue with purchase verification integration

Debug steps:

  1. Verify webhook configuration (RevenueCat/Apphud/Iaptic)
  2. Check that affiliate identifier is being passed to purchase platform
  3. For RevenueCat: Verify insert_affiliate attribute appears in RevenueCat dashboard
  4. Review Troubleshooting guide

Scenario 3: Nothing Works

Diagnosis: Multiple issues or setup problems

Debug steps:

  1. Start with Quick Start guide
  2. Verify API key is correct in SDK initialization
  3. Check Insert Affiliate dashboard settings are configured
  4. Enable verbose logging
  5. Test with short codes first
  6. 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

  1. Always test with short codes first - Isolates issues
  2. Use verbose logging liberally - Helps catch issues early
  3. Test frequently - Don't wait until the end to test integration
  4. Test on real devices - Simulators can behave differently

Before Launch

  1. Complete the testing checklist - Ensure all scenarios are covered
  2. Test cold start attribution - Critical user experience
  3. Review your dashboard - Familiarize yourself with the data

After Launch

  1. Monitor initial transactions - Verify everything works in production
  2. Keep verbose logging available - Use debug builds if issues arise

Getting Help

If you encounter issues during testing:

  1. Check Troubleshooting - Step-by-step debugging guide
  2. Review platform documentation - Deep linking and purchase verification guides
  3. Contact support - Email michael@insertaffiliate.com or visit app.insertaffiliate.com/help

Next Steps

Once testing is complete: