Test Setup
Verify your Mobana integration is working correctly by testing attribution, conversions, and flows.
Testing Attribution#
Test the full attribution flow from redirect URL to SDK retrieval.
1. Dashboard Setup#
- Go to your Mobana Dashboard
- Navigate to your app and copy your App ID
- Note your redirect URL format:
https://YOUR_APP_ID.mobana.ai/redirect
2. Create a Test Redirect URL#
Build a redirect URL with test UTM parameters:
https://YOUR_APP_ID.mobana.ai/redirect?utm_source=test&utm_campaign=my_test_campaign&utm_medium=manual&data={"promo":"WELCOME10"}Use distinct values like utm_source=test so you can easily identify test attributions in your Dashboard and logs.
3. Run the Test#
- Open the redirect URL on your test device — Use the device's native browser (Safari on iOS, Chrome on Android). This simulates a user clicking your campaign link.
- You'll be redirected to the App Store / Play Store — This is expected behavior. The attribution data has been captured.
- Launch your app — Make sure the SDK is initialized with
debug: true. - Call getAttribution() — The SDK will retrieve the attribution data from your test click.
4. Verify Results#
import { Mobana } from '@mobana/react-native-sdk';
// Initialize with debug mode
await Mobana.init({
appId: 'YOUR_APP_ID',
debug: true,
});
// Get attribution (will show debug logs)
const attribution = await Mobana.getAttribution();
console.log('Attribution result:', JSON.stringify(attribution, null, 2));
// Expected output for successful attribution:
// {
// "utm_source": "test",
// "utm_campaign": "my_test_campaign",
// "utm_medium": "manual",
// "confidence": 1.0,
// "data": { "promo": "WELCOME10" }
// }What to look for:
- In your app logs: Debug output showing the attribution request and response with your test UTM parameters
- In the Dashboard: Navigate to Analytics → Attribution to see your test click recorded with the UTM values you used
Attribution is Sticky#
Once the SDK receives an attribution response (whether attribution was found or not), it caches the result and will not attempt attribution again. This ensures accurate first-touch attribution in production.
During development, use reset() to clear the cached state and test the attribution flow again:
// Clear attribution state to test again
await Mobana.reset();
// Now getAttribution() will perform a fresh lookupTroubleshooting#
- Attribution returns null: Make sure you opened the redirect URL before launching the app. Call
reset()and try again. - Wrong attribution data: You may have a cached attribution from a previous test. Call
reset()to clear it. - No debug logs: Ensure
debug: trueis set in yourinit()config. - Android-specific: Install Referrer attribution requires the app to be installed from a store context. For development, probabilistic matching is used instead.
Testing Conversions#
Verify that conversion events are being tracked and appear in your Dashboard.
1. Dashboard Setup#
- Go to your Dashboard → Settings → Conversion Types
- Add a test conversion type (e.g.,
test_event) - Optionally add a valued conversion type for testing revenue tracking
Conversions must be configured in the Dashboard before they can be tracked. Unregistered conversion types will be rejected.
2. Track Test Conversions#
import { Mobana } from '@mobana/react-native-sdk';
// Track a test conversion
await Mobana.trackConversion('test_event');
// Track with a value
await Mobana.trackConversion('test_purchase', 9.99);
// Debug logs will confirm the conversion was sent3. Verify Results#
What to look for:
- In your app logs: Debug output showing the conversion request was sent successfully
- In the Dashboard: Navigate to Analytics → Conversions to see your test events. They will be linked to the device's attribution if one exists.
Conversions are queued locally and sent when network is available. If you're testing offline behavior, conversions will appear in the Dashboard once the device comes back online.
Troubleshooting#
- Conversion not appearing: Check that the conversion type is registered in your Dashboard settings.
- No attribution link: Conversions are linked to attribution based on device ID. If attribution hasn't run yet, the conversion will still be recorded but won't have UTM data attached.
Testing Flows#
Test that in-app flows display correctly and return expected results.
1. Dashboard Setup#
- Go to your Dashboard → Flows
- Create a new flow or use an existing one
- Publish the flow — Draft flows are not accessible
- Copy the Flow ID (visible in the flow settings or URL)
2. App Setup#
Ensure your app has the required setup for flows:
- •
react-native-webviewis installed - • SDK is initialized with
debug: true(optional, for development) - • Your app is wrapped with
MobanaProvider
import { MobanaProvider } from '@mobana/react-native-sdk';
export default function App() {
return (
<MobanaProvider>
{/* Your app */}
</MobanaProvider>
);
}3. Start a Test Flow#
import { Mobana } from '@mobana/react-native-sdk';
// Start a flow
const result = await Mobana.startFlow('your-flow-id');
console.log('Flow result:', result);
// { completed: true, dismissed: false, data: { ... } }
// or
// { completed: false, dismissed: true, data: null }4. Verify Results#
What to look for:
- In your app: The flow should appear as a full-screen modal overlay. Interact with it to test navigation between slides.
- Flow result: When the flow completes or is dismissed, check the returned object for
completed,dismissed, and anydatayou passed tocomplete(). - In your app logs: Debug output showing flow events (slide views, button clicks, completions)
- In the Dashboard: Navigate to Flows → Analytics to see engagement metrics for your test flow
Troubleshooting#
- Flow doesn't appear: Check that
MobanaProviderwraps your app and the flow is published (not draft). - White screen or loading: The flow content is being fetched. Use
prefetchFlow()to avoid this delay. - Permissions not working: Ensure the required native packages are installed (e.g.,
react-native-permissions) and permissions are configured in your iOS Podfile / Android manifest. - Flow not found error: Verify the Flow ID is correct and the flow is published.
Debug Mode Reference#
When debug: true is set in init(), the SDK logs detailed information about:
- • Attribution requests and responses
- • Conversion tracking events
- • Flow lifecycle events
- • Network requests and errors
- • Cache state and storage operations
Set debug: __DEV__ to automatically enable logging only in development builds.