Installation

This section will guide you through installing, configuring, and initializing the Mtrix analytics and experimentation platform in your website.

Installation

Mtrix is distributed as an NPM package, making it easy to integrate with modern JavaScript websites.

Using npm

npm install mtrix --save

Using yarn

yarn add mtrix

Using a CDN

If you're not using a module bundler, you can include Mtrix directly in your HTML:

<!-- Include the UMD build -->
<script src="https://cdn.jsdelivr.net/npm/mtrix@latest/dist/mtrix.umd.js"></script>

<!-- Mtrix is now available as a global variable -->
<script>
    mtrix.init({
        organizationId: 'your-organization-id',
        projectId: 'your-project-id',
        environment: 'production'
    });
</script>

Last updated