Debugging Tools
Built-in Debugging Mode
Mtrix includes a comprehensive debugging mode to help identify issues:
mtrix.init({
organizationId: 'your-organization-id',
projectId: 'your-project-id',
environment: 'development',
options: {
debug: true // Enable debug mode
}
});
// Or enable debug mode after initialization
mtrix.setDebugMode(true);
With debug mode enabled, you'll see detailed logs in the browser console:
[Mtrix] Version: 0.1.0
[Mtrix] Initializing with config: { organizationId: "org-123", ... }
[Mtrix] Environment detected: development
[Mtrix] Browser support check passed
[Mtrix] Event tracking enabled
[Mtrix] Session recording enabled
[Mtrix] Performance monitoring enabled
[Mtrix] Event tracked: PageView { url: "/products", ... }
[Mtrix] API request sent: /events (200 OK)
Mtrix Developer Tools
For advanced debugging, use the Mtrix Developer Tools extension:
Install the browser extension (Chrome, Firefox, Edge supported)
Open Developer Tools and navigate to the "Mtrix" tab
View real-time events, experiment assignments, and API requests
Key features:
Event Inspector: See all events being tracked
Request Analyzer: View API requests and responses
Experiment Debugger: Check experiment assignment logic
Performance Monitor: Debug performance tracking
Session Recorder: Test recording functionality
Last updated