2.0.0 • Published 2 years ago
@logfy/web v2.0.0
Logfy Web
Installation
npm install @logfy/web
or
yarn add @logfy/web
Usage
Init
import Logfy from '@logfy/web';
Logfy.init({ publicKey: 'YOUR_PUBLIC_KEY', cookiesDisabled: true });
publicKey
- project public keycookiesDisabled
- use this property to disable anonymous user tracking
Track
Logfy.track({
event: 'UserJoined',
notify: true,
message: 'john@doe.com has subscribed',
userId: 'john@doe.com',
metadata: { additionalData: 'abc123' }
});