Frontend IntegrationWeb ObjectInstallation

Installation

The npm package is @usesophi/sophi-web-object. Artifacts live under dist/ in the package.

The npm package is @usesophi/sophi-web-object. Artifacts live under dist/ in the package.

FileUse case
sophi.min.jsProduction: <script src="..."> or GTM Custom HTML
sophi.jsDebugging (source maps, readable bundle)
sophi.esm.jsBundlers / dynamic import

jsDelivr CDN

URLResolves to
https://cdn.jsdelivr.net/npm/@usesophi/sophi-web-object@1.3.x/dist/sophi.min.jsLatest 1.3.x patch — automatically picks the newest compatible patch within the 1.3 minor line; includes built-in pre-load queue
https://cdn.jsdelivr.net/npm/@usesophi/sophi-web-object@x.y.z/dist/sophi.min.jsAny pinned version (replace x.y.z)
Version pinning

Always pin an exact semver in production URLs — never use @latest. This ensures a new SDK release cannot change behaviour until you deliberately update the URL.

Where to go next

Step-by-step setup lives in one of these pages—pick one and follow it through:

  • GTM integration — Google Tag Manager, consent-gated load, upgrade path via a Constant variable.
  • Integration guide — Choosing GTM vs script vs npm, the required pre-load stub snippet, and a short events cheat sheet.

For a copy-paste HTML snippet with the pre-load stub and all warnings, the integration guide is the quickest read.

Next steps

On this page