JavaScript SDK Installation

Install the Emp-Mix JavaScript SDK in your web application.

Overview

The @empmix/sdk-js package is the official client-side tracking library for web applications. It is lightweight, tree-shakable, and supports all modern browsers. It automatically handles anonymous identity generation, session management, and offline queueing.

Installation via Package Manager (Recommended)

If you are using a bundler (Webpack, Vite, Rollup) or a meta-framework (Next.js, Remix, Nuxt), install the SDK using your preferred package manager.

npm install @empmix/sdk-js

Installation via CDN

If you are building a static HTML site without a build step, you can include the SDK directly via a script tag in your <head>.

<!-- Add this just before your closing </head> tag -->
<script src="https://cdn.empmix.com/sdk-js/latest/empmix.min.js"></script>

Next Steps

Once the package is installed, proceed to Initialization to configure the SDK with your API key.

Last updated on June 4, 2026