SaasHound client for Angular apps.
To install the ngx-saashound library, run the following command:
npm install ngx-saashound
yarn add ngx-saashound
pnpm install ngx-saashound
import { SaasHound } from 'ngx-saashound'; @Component({ selector: 'app-root', templateUrl: './app.component.html', standalone: true, imports: [],})export class AppComponent { saasHoundService = inject(SaashoundService); constructor(){ this.saasHoundService.init({ project: 'my-project', apiKey: environment.saashoundToken, // trackPageViews: false, }); } // Track an event public sendEvent { await saashound.logEvent({ channel: "payments", title: "New Customer", userId: "user-123", icon: "💰", notify: true, tags: { plan: "premium", cycle: "onetime", trial: false } }); } // Identify user Properties (e.g. name, age, email, plan, level, etc.) identifyUser() { await saashound.identify({ userId: "user-123", properties: { name: "John Doe", email: "john@doe.com", plan: "premium", } }); } // Track a metric public sendMetric { await saashound.sendMetric({ title: "Users", value: 1254, icon: "👥", increment: false, }); }}