Overview
trench-js
is a client library for both web and Node.js environments that allows you to send events to any Trench instance. This library is designed to be easy to use and integrate into your existing projects. The library is built on top of Analytics and supports all of its methods. It can be installed via a package manager or via a CDN script tag.
Installation via package manager
Installtrench-js
using your preferred package manager:
Installation via CDN script tag
Alternatively, you can use the CDN version:trench
object to the global scope and you can start tracking events automatically as autoCaptureEvents
is set to true
by default.