Front Facing Event Tracking Library for Kind
Installation & Development:
-
npm install
, add--legacy-peer-deps
if onnpm@8.x
and installation fails npm start
Publishing:
- make sure to manually bump version in
package.json
npm run prepare
- commit all your changes
npm run trypublish
Usage:
@engaging-care/kind-web-events-service
is a public package, so each version we release can be used from unpkg cdn, like below:
<script src="https://unpkg.com/@engaging-care/kind-web-events-service@XXX" async>
/* XXX is the version you just published */
This exposes on the window
object the KindWebEventsService
class constructor, and it can be used like this:
const KindWebEventsService = window.KindWebEventsService.default;
const kindService = new KindWebEventsService('development');
kindService.sendClickEvent('WEBFLOW_HOME', 'WEBFLOW_ABOUT');