5.1.1 • Published 8 months ago
@logspot/web v5.1.1
@logspot/web
Logspot SDK for browser applications built with React, Next.js, Angular, etc.
Installation
npm install @logspot/web
or
yarn add @logspot/web
Usage
Init
import Logspot from "@logspot/web";
Logspot.init({ publicKey: "YOUR_PUBLIC_KEY", cookiesDisabled: true });
publicKey
- project public keycookiesDisabled
- use this property to disable anonymous user trackingenableAutoPageviews
- enable auto tracking of pageviews (default: true)stickyCampaigns
- enable storing UTM parameters in cookies (default: true)stickyCampaignsExpirationInSeconds
- timeout for sticky campaigns (default: 7 days)enableAutoClicks
- enable auto capture of user clicks (default: false)externalApiUrl
- provide here API proxy urlonLoad
- use this function to perform actions when Logspot is loaded. E.g. register super properties before initial pageview
Track
Logspot.track({
event: "UserSubscribed",
channel: "Sign ups",
notify: true,
message: "john@doe.com has subscribed",
userId: "john@doe.com",
metadata: { additionalData: "123" },
});
Pageview
Logspot.pageview({
userId: "john@doe.com",
metadata: { additionalData: "123" },
});
Register
Logspot.register({
email: "john@doe.com",
authenticated: true,
project: "SuperStartup",
});
5.1.1
8 months ago
5.1.0
8 months ago
5.0.0
12 months ago
4.5.0
1 year ago
4.7.0
1 year ago
4.6.0
1 year ago
4.4.1
1 year ago
4.4.0
1 year ago
4.3.0
1 year ago
4.2.1
2 years ago
4.2.0
2 years ago
3.0.2
2 years ago
3.0.1
2 years ago
3.0.0
2 years ago
4.1.0
2 years ago
4.0.1
2 years ago
4.0.0
2 years ago
4.0.2
2 years ago
2.3.0
2 years ago
2.1.2
2 years ago
2.2.0
2 years ago
2.1.1
2 years ago
2.4.1
2 years ago
2.1.4
2 years ago
2.4.0
2 years ago
2.1.3
2 years ago
2.1.6
2 years ago
2.1.5
2 years ago
2.1.8
2 years ago
2.1.7
2 years ago
2.1.0
2 years ago
2.1.9
2 years ago
2.0.1
2 years ago
2.0.0
2 years ago
1.1.1
2 years ago
1.1.0
2 years ago
1.0.6
2 years ago
1.0.5
2 years ago
1.1.2
2 years ago
1.0.4
2 years ago
1.0.3
2 years ago
1.0.2
2 years ago
1.0.0
2 years ago