When to Use Client Mode
Use client mode when:- Running local demos without API access
- Testing popup behavior in QA environments
- Building integration tests that shouldn’t depend on external APIs
- Creating hardcoded fallback flows
- Validating trigger logic before deploying to production
Basic Setup
Popup Definition Structure
Each popup definition must include these fields:Trigger Configuration
Thetriggers field determines when your popup appears:
Important:
- The property name is
triggers(plural), nottrigger time_on_pagevalues are defined in seconds, not milliseconds- The SDK converts seconds to milliseconds internally
Condition Configuration
Conditions control when popups can be shown:answered: Set tofalseto only show popups for unanswered surveyscooldownDays: Minimum days between popup displays
Segment Targeting
Usesegments.path to target specific routes:
Complete Example
Here’s a complete client mode setup with multiple popup types:Styling Popups
Customize popup appearance with the optionalstyle field:
The current browser renderer focuses on the embedded MagicFeedback form and does not render
title, message, or style fields as standalone popup controls. These fields are part of the definition contract for future renderer implementations.Action Configuration
Define button labels and behavior:Testing Locally
To test client mode popups locally:- Create an HTML file with your SDK setup
- Use a local HTTP server (file:// URLs may not work correctly)
- Enable debug mode to see trigger logs
Next Steps
Event Triggers
Trigger popups from business events
Exit Popups
Show popups after route navigation
Route Targeting
Target popups to specific pages
Server Mode
Switch to remote popup management