saashound
TypeScript icon, indicating that this package has built-in type declarations

0.0.6 • Public • Published

SaasHound

Monitor and track what's happening in your javascript application including Node.js/Angular/React/React-Native/Vue and more.

Installation


yarn add saashound

or

npm install saashound

Usage


Import Library

import SaasHound from 'saashound';

Setup Client

const saashound = new SaasHound({
  project: '<your-project-name>',
  token: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'
});

Tracking events

const onSignUpComplete = (params) => {
  // log event
  const { user } = params;
  saashound.logEvent({
    title: "User registered",
    channel: "user-actiity",
    icon: '🎊',
    message: user.first_name + " has registered",
	notify: true,
    tags: {
      userId: user.id,
      username: user.username,
      email: user.email,
    },
  });
};

Send metrics

const onSignUpComplete = (params) => {
  // update metrics
  
  saashound.sendMetric({
    name: "User Count",
    increment_by: 1,
    icon: "🧾",
  });
};

You can also use our builder to quickly prototype and publish new events and metrics.

Package Sidebar

Install

npm i saashound

Weekly Downloads

62

Version

0.0.6

License

MIT

Unpacked Size

95.5 kB

Total Files

22

Last publish

Collaborators

  • adeteejay