Core API Reference
Mtrix initialized: v1.1.0Core Methods
mtrix.init(config)mtrix.init({
organizationId: 'org-123',
projectId: 'proj-456',
environment: 'production'
});Last updated
Mtrix initialized: v1.1.0mtrix.init(config)mtrix.init({
organizationId: 'org-123',
projectId: 'proj-456',
environment: 'production'
});Last updated
mtrix.trackEvent('ButtonClicked', {
buttonId: 'signup-button',
location: 'hero-section'
});const experiments = await mtrix.getPageDetails({
location: '/checkout',
userId: 'user-123',
audience: [
{
audienceKey: 'country',
value: 'CA'
}
]
});
console.log(experiments);
{
}const metrics = mtrix.getPerformance();
console.log('LCP:', metrics.LCP, 'CLS:', metrics.CLS);