CDN Usage

If you prefer to include Nano Analytics from a CDN instead of installing via npm or using a build step, you can use jsDelivr to load either an ES module build (recommended for modern sites) or the UMD bundle (for broad compatibility).

Quick notes

  • Pin to an exact version (e.g. @1.0.0) for repeatable behavior.
  • The ESM build uses the +esm entrypoint on jsDelivr; the UMD bundle is provided under dist/.
  • Both builds expose the same runtime API; the ESM import gives you the named/default export, the UMD build attaches a global to window.

ESM (modern browsers — recommended)

<nano-analytics
  projectKey="PROJECT_KEY"
/>

<script type="module">
  import nanoAnalytics from "https://cdn.jsdelivr.net/npm/nano-analytics@1.0.0/+esm";
</script>

Last updated on