@logopulse/sdk 1.2.1 → 1.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +393 -93
- package/dist/index.d.ts +33 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +34 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
# @logopulse/sdk
|
|
2
2
|
|
|
3
|
-
**
|
|
3
|
+
**Track customer health analytics for any B2B SaaS platform.**
|
|
4
4
|
|
|
5
|
-
Track the pulse of every customer -
|
|
5
|
+
Track the pulse of every customer - flexible entity tracking, configurable stage progression, and automatic feature adoption analytics.
|
|
6
6
|
|
|
7
7
|
## Installation
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
10
|
npm install @logopulse/sdk
|
|
11
|
-
# or
|
|
12
|
-
yarn add @logopulse/sdk
|
|
13
11
|
```
|
|
14
12
|
|
|
15
13
|
## Quick Start
|
|
@@ -18,165 +16,467 @@ yarn add @logopulse/sdk
|
|
|
18
16
|
import { createLogoPulse } from '@logopulse/sdk';
|
|
19
17
|
|
|
20
18
|
// Initialize once (singleton)
|
|
21
|
-
const
|
|
22
|
-
apiUrl: 'https://api.logopulse.io/production',
|
|
19
|
+
const logoPulse = createLogoPulse({
|
|
23
20
|
apiKey: 'your-api-key-here',
|
|
24
|
-
orgId: 'your-
|
|
25
|
-
timeout: 5000, // Optional (default:
|
|
21
|
+
orgId: 'your-org-id',
|
|
22
|
+
timeout: 5000, // Optional: request timeout in ms (default: 5000)
|
|
26
23
|
});
|
|
27
24
|
|
|
28
|
-
// Track
|
|
29
|
-
await
|
|
30
|
-
await
|
|
31
|
-
await
|
|
32
|
-
await analytics.track('user.login', accountId, { email: 'user@company.com' });
|
|
25
|
+
// Track custom entities - unlimited entity types, no configuration required!
|
|
26
|
+
await logoPulse.track('batch.created', accountId, { batchId: 'batch-123' });
|
|
27
|
+
await logoPulse.track('order.processed', accountId, { orderId: 'order-456', amount: 250.50 });
|
|
28
|
+
await logoPulse.track('report.generated', accountId, { reportType: 'analytics' });
|
|
33
29
|
|
|
34
|
-
// Track
|
|
35
|
-
await
|
|
36
|
-
await
|
|
37
|
-
await
|
|
30
|
+
// Track customer lifecycle with pre-built methods
|
|
31
|
+
await logoPulse.createCustomer({ accountId, companyName: 'Acme Corp', ownerEmail: 'owner@acme.com' });
|
|
32
|
+
await logoPulse.userLogin(accountId, { email: 'user@acme.com' });
|
|
33
|
+
await logoPulse.subscriptionStarted(accountId, { plan: 'pro', amount: 99.00 });
|
|
38
34
|
```
|
|
39
35
|
|
|
40
|
-
##
|
|
36
|
+
## Core Concepts
|
|
37
|
+
|
|
38
|
+
### Entities vs Actions
|
|
39
|
+
|
|
40
|
+
**Entities** (unlimited - define your own):
|
|
41
|
+
- Any countable business object your customers create
|
|
42
|
+
- Examples: `batch`, `order`, `product`, `report`, `document`, `shipment`, `invoice`, `warehouse`
|
|
43
|
+
- LogoPulse automatically tracks count, timestamps, and revenue for each entity type
|
|
44
|
+
- **No configuration required** - just start tracking!
|
|
45
|
+
|
|
46
|
+
**Actions** (limited - predefined set):
|
|
47
|
+
- Standard verbs that describe what happened to an entity
|
|
48
|
+
- See [Standard Actions](#standard-actions) below
|
|
49
|
+
- Consistent actions ensure proper tracking across all entity types
|
|
50
|
+
|
|
51
|
+
**Event Format:** `entity.action` (e.g., `batch.created`, `order.processed`)
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## API Reference
|
|
41
56
|
|
|
42
57
|
### Initialization
|
|
43
58
|
|
|
59
|
+
#### `createLogoPulse(config)`
|
|
60
|
+
|
|
61
|
+
Initialize the SDK with your credentials.
|
|
62
|
+
|
|
44
63
|
```typescript
|
|
45
64
|
import { createLogoPulse } from '@logopulse/sdk';
|
|
46
65
|
|
|
47
|
-
const
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
timeout: 5000, // Optional (default: 5000ms)
|
|
66
|
+
const logoPulse = createLogoPulse({
|
|
67
|
+
apiKey: 'your-api-key', // Required: Your LogoPulse API key
|
|
68
|
+
orgId: 'your-org-id', // Required: Your organization ID
|
|
69
|
+
timeout: 5000, // Optional: Request timeout in ms (default: 5000)
|
|
52
70
|
});
|
|
53
71
|
```
|
|
54
72
|
|
|
55
|
-
|
|
73
|
+
#### `getLogoPulse()`
|
|
74
|
+
|
|
75
|
+
Get the singleton instance (must call `createLogoPulse()` first).
|
|
76
|
+
|
|
77
|
+
```typescript
|
|
78
|
+
import { getLogoPulse } from '@logopulse/sdk';
|
|
79
|
+
|
|
80
|
+
const logoPulse = getLogoPulse();
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### Core Tracking
|
|
56
84
|
|
|
57
|
-
|
|
85
|
+
#### `track(eventType, accountId, data?, options?)`
|
|
86
|
+
|
|
87
|
+
Track any custom entity event using the `entity.action` format.
|
|
58
88
|
|
|
59
89
|
```typescript
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
* @param options - Additional metadata (optional)
|
|
66
|
-
*/
|
|
67
|
-
await analytics.track(
|
|
68
|
-
'batch.created',
|
|
69
|
-
'customer-account-123',
|
|
70
|
-
{
|
|
71
|
-
batchId: 'batch-abc-123',
|
|
90
|
+
await logoPulse.track(
|
|
91
|
+
'batch.created', // eventType: entity.action
|
|
92
|
+
'account-123', // accountId: customer account ID
|
|
93
|
+
{ // data: optional event data
|
|
94
|
+
batchId: 'batch-456',
|
|
72
95
|
productName: 'Widget',
|
|
73
96
|
quantity: 100,
|
|
74
|
-
|
|
97
|
+
amount: 1250.00 // Include amount to track revenue
|
|
75
98
|
},
|
|
76
|
-
{
|
|
77
|
-
userId: 'user-
|
|
78
|
-
traceId: 'trace-
|
|
79
|
-
source: '
|
|
99
|
+
{ // options: optional metadata
|
|
100
|
+
userId: 'user-789',
|
|
101
|
+
traceId: 'trace-abc',
|
|
102
|
+
source: 'api-service',
|
|
103
|
+
timestamp: '2026-01-05T12:00:00Z'
|
|
80
104
|
}
|
|
81
105
|
);
|
|
82
106
|
```
|
|
83
107
|
|
|
84
|
-
|
|
108
|
+
**When to use:** For tracking any custom entity specific to your business (unlimited entity types).
|
|
85
109
|
|
|
86
|
-
|
|
110
|
+
---
|
|
87
111
|
|
|
88
|
-
|
|
89
|
-
- `batch`, `order`, `payment`, `user`, `document`, `warehouse`, `shipment`
|
|
90
|
-
- `tip`, `payout`, `export`, `import`, `report`, `integration`
|
|
91
|
-
- **Any custom entity you want to track!**
|
|
112
|
+
### Customer Management
|
|
92
113
|
|
|
93
|
-
|
|
94
|
-
- `created`, `updated`, `deleted`, `processed`, `completed`
|
|
95
|
-
- `uploaded`, `generated`, `connected`, `disconnected`, `synced`
|
|
114
|
+
#### `createCustomer(account)`
|
|
96
115
|
|
|
97
|
-
|
|
116
|
+
Track new customer account creation (first-time signup).
|
|
117
|
+
|
|
118
|
+
```typescript
|
|
119
|
+
await logoPulse.createCustomer({
|
|
120
|
+
accountId: 'account-123',
|
|
121
|
+
companyName: 'Acme Corp',
|
|
122
|
+
ownerEmail: 'owner@acme.com',
|
|
123
|
+
ownerFirstName: 'John',
|
|
124
|
+
ownerLastName: 'Doe',
|
|
125
|
+
phone: '+1-555-0100',
|
|
126
|
+
address: '123 Main St',
|
|
127
|
+
city: 'San Francisco',
|
|
128
|
+
state: 'CA',
|
|
129
|
+
country: 'USA',
|
|
130
|
+
postalCode: '94102',
|
|
131
|
+
});
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
**When to use:** When a new business/company completes signup.
|
|
135
|
+
|
|
136
|
+
#### `updateCustomer(accountId, updates)`
|
|
137
|
+
|
|
138
|
+
Update customer account information.
|
|
139
|
+
|
|
140
|
+
```typescript
|
|
141
|
+
await logoPulse.updateCustomer('account-123', {
|
|
142
|
+
companyName: 'Acme Corporation',
|
|
143
|
+
phone: '+1-555-0200',
|
|
144
|
+
});
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
**When to use:** When account details change.
|
|
148
|
+
|
|
149
|
+
#### `addUser(user)`
|
|
150
|
+
|
|
151
|
+
Track when a user joins an existing account (additional seat).
|
|
152
|
+
|
|
153
|
+
```typescript
|
|
154
|
+
await logoPulse.addUser({
|
|
155
|
+
accountId: 'account-123',
|
|
156
|
+
userId: 'user-456',
|
|
157
|
+
email: 'admin@acme.com',
|
|
158
|
+
firstName: 'Jane',
|
|
159
|
+
lastName: 'Smith',
|
|
160
|
+
role: 'admin',
|
|
161
|
+
});
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
**When to use:** When user accepts invitation or is added to account.
|
|
165
|
+
|
|
166
|
+
---
|
|
167
|
+
|
|
168
|
+
### User Activity
|
|
169
|
+
|
|
170
|
+
#### `userLogin(accountId, data?)`
|
|
171
|
+
|
|
172
|
+
```typescript
|
|
173
|
+
await logoPulse.userLogin('account-123', {
|
|
174
|
+
email: 'user@acme.com',
|
|
175
|
+
userId: 'user-456',
|
|
176
|
+
});
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
**When to use:** On successful user authentication.
|
|
180
|
+
|
|
181
|
+
#### `userInvited(accountId, data)`
|
|
182
|
+
|
|
183
|
+
```typescript
|
|
184
|
+
await logoPulse.userInvited('account-123', {
|
|
185
|
+
email: 'newuser@acme.com',
|
|
186
|
+
role: 'member',
|
|
187
|
+
});
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
#### `userAcceptedInvite(accountId, data)`
|
|
191
|
+
|
|
192
|
+
```typescript
|
|
193
|
+
await logoPulse.userAcceptedInvite('account-123', {
|
|
194
|
+
userId: 'user-789',
|
|
195
|
+
email: 'newuser@acme.com',
|
|
196
|
+
role: 'member',
|
|
197
|
+
});
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
#### `userRemoved(accountId, data)`
|
|
201
|
+
|
|
202
|
+
```typescript
|
|
203
|
+
await logoPulse.userRemoved('account-123', {
|
|
204
|
+
userId: 'user-456',
|
|
205
|
+
});
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
---
|
|
209
|
+
|
|
210
|
+
### Integrations
|
|
211
|
+
|
|
212
|
+
#### `integrationConnected(accountId, data)`
|
|
213
|
+
|
|
214
|
+
```typescript
|
|
215
|
+
await logoPulse.integrationConnected('account-123', {
|
|
216
|
+
integrationName: 'stripe',
|
|
217
|
+
});
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
**When to use:** When customer connects Stripe, Shopify, etc.
|
|
221
|
+
|
|
222
|
+
#### `integrationDisconnected(accountId, data)`
|
|
223
|
+
|
|
224
|
+
```typescript
|
|
225
|
+
await logoPulse.integrationDisconnected('account-123', {
|
|
226
|
+
integrationName: 'stripe',
|
|
227
|
+
});
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
---
|
|
231
|
+
|
|
232
|
+
### Subscription & Billing
|
|
233
|
+
|
|
234
|
+
#### `subscriptionStarted(accountId, data?)`
|
|
235
|
+
|
|
236
|
+
```typescript
|
|
237
|
+
await logoPulse.subscriptionStarted('account-123', {
|
|
238
|
+
plan: 'pro',
|
|
239
|
+
amount: 99.00,
|
|
240
|
+
interval: 'monthly',
|
|
241
|
+
});
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
**When to use:** When customer starts paying subscription.
|
|
245
|
+
|
|
246
|
+
#### `subscriptionUpgraded(accountId, data)`
|
|
247
|
+
|
|
248
|
+
```typescript
|
|
249
|
+
await logoPulse.subscriptionUpgraded('account-123', {
|
|
250
|
+
plan: 'enterprise',
|
|
251
|
+
amount: 299.00,
|
|
252
|
+
});
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
#### `subscriptionDowngraded(accountId, data)`
|
|
256
|
+
|
|
257
|
+
```typescript
|
|
258
|
+
await logoPulse.subscriptionDowngraded('account-123', {
|
|
259
|
+
plan: 'starter',
|
|
260
|
+
amount: 49.00,
|
|
261
|
+
});
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
#### `subscriptionRenewed(accountId, data?)`
|
|
265
|
+
|
|
266
|
+
```typescript
|
|
267
|
+
await logoPulse.subscriptionRenewed('account-123');
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
#### `subscriptionCancelled(accountId, data?)`
|
|
271
|
+
|
|
272
|
+
```typescript
|
|
273
|
+
await logoPulse.subscriptionCancelled('account-123', {
|
|
274
|
+
reason: 'switching to competitor',
|
|
275
|
+
});
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
---
|
|
279
|
+
|
|
280
|
+
### Trial Management
|
|
281
|
+
|
|
282
|
+
#### `trialStarted(accountId, data?)`
|
|
283
|
+
|
|
284
|
+
```typescript
|
|
285
|
+
await logoPulse.trialStarted('account-123', {
|
|
286
|
+
plan: 'pro-trial',
|
|
287
|
+
trialEndsAt: '2026-02-05T00:00:00Z',
|
|
288
|
+
});
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
#### `trialEnded(accountId, data?)`
|
|
292
|
+
|
|
293
|
+
```typescript
|
|
294
|
+
await logoPulse.trialEnded('account-123', {
|
|
295
|
+
converted: true,
|
|
296
|
+
});
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
#### `trialExpired(accountId)`
|
|
300
|
+
|
|
301
|
+
```typescript
|
|
302
|
+
await logoPulse.trialExpired('account-123');
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
---
|
|
306
|
+
|
|
307
|
+
### Feature Adoption
|
|
308
|
+
|
|
309
|
+
#### `trackFeature(accountId, featureName)`
|
|
310
|
+
|
|
311
|
+
Manually track feature adoption.
|
|
312
|
+
|
|
313
|
+
```typescript
|
|
314
|
+
await logoPulse.trackFeature('account-123', 'apiAccess');
|
|
315
|
+
await logoPulse.trackFeature('account-123', 'advancedReporting');
|
|
316
|
+
```
|
|
317
|
+
|
|
318
|
+
**When to use:** For features not automatically tracked via entity-to-feature mapping.
|
|
319
|
+
|
|
320
|
+
---
|
|
321
|
+
|
|
322
|
+
## Standard Actions
|
|
323
|
+
|
|
324
|
+
Use these standard actions with `track()` for consistent entity tracking:
|
|
98
325
|
|
|
99
326
|
```typescript
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
327
|
+
import { StandardActions } from '@logopulse/sdk';
|
|
328
|
+
|
|
329
|
+
// Creation/Addition
|
|
330
|
+
StandardActions.CREATED // 'created'
|
|
331
|
+
StandardActions.ADDED // 'added'
|
|
332
|
+
|
|
333
|
+
// Modification
|
|
334
|
+
StandardActions.UPDATED // 'updated'
|
|
335
|
+
StandardActions.CHANGED // 'changed'
|
|
336
|
+
|
|
337
|
+
// Removal
|
|
338
|
+
StandardActions.DELETED // 'deleted'
|
|
339
|
+
StandardActions.REMOVED // 'removed'
|
|
340
|
+
StandardActions.CANCELLED // 'cancelled'
|
|
341
|
+
|
|
342
|
+
// Data Operations
|
|
343
|
+
StandardActions.UPLOADED // 'uploaded'
|
|
344
|
+
StandardActions.DOWNLOADED // 'downloaded'
|
|
345
|
+
StandardActions.IMPORTED // 'imported'
|
|
346
|
+
StandardActions.EXPORTED // 'exported'
|
|
347
|
+
StandardActions.GENERATED // 'generated'
|
|
348
|
+
|
|
349
|
+
// Processing
|
|
350
|
+
StandardActions.PROCESSED // 'processed'
|
|
351
|
+
StandardActions.FAILED // 'failed'
|
|
352
|
+
StandardActions.SYNCED // 'synced'
|
|
353
|
+
```
|
|
104
354
|
|
|
105
|
-
|
|
106
|
-
await analytics.track('batch.created', accountId, { batchId, quantity });
|
|
107
|
-
await analytics.track('stock.synced', accountId, { productCount, warehouseCount });
|
|
355
|
+
**Examples:**
|
|
108
356
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
await
|
|
112
|
-
await
|
|
357
|
+
```typescript
|
|
358
|
+
// E-commerce SaaS
|
|
359
|
+
await logoPulse.track('order.created', accountId, { orderId, amount });
|
|
360
|
+
await logoPulse.track('shipment.delivered', accountId, { shipmentId });
|
|
113
361
|
|
|
114
|
-
//
|
|
115
|
-
await
|
|
116
|
-
await
|
|
362
|
+
// Inventory SaaS
|
|
363
|
+
await logoPulse.track('product.created', accountId, { sku, name });
|
|
364
|
+
await logoPulse.track('warehouse.added', accountId, { warehouseId });
|
|
117
365
|
|
|
118
|
-
//
|
|
119
|
-
await
|
|
120
|
-
await
|
|
121
|
-
await analytics.track('subscription.activated', accountId, { plan, mrr });
|
|
122
|
-
await analytics.track('subscription.cancelled', accountId);
|
|
366
|
+
// Reporting SaaS
|
|
367
|
+
await logoPulse.track('report.generated', accountId, { reportType });
|
|
368
|
+
await logoPulse.track('dashboard.created', accountId, { dashboardId });
|
|
123
369
|
|
|
124
|
-
//
|
|
125
|
-
await
|
|
126
|
-
await
|
|
370
|
+
// Document Management SaaS
|
|
371
|
+
await logoPulse.track('document.uploaded', accountId, { fileSize });
|
|
372
|
+
await logoPulse.track('folder.created', accountId, { folderId });
|
|
127
373
|
```
|
|
128
374
|
|
|
129
|
-
|
|
375
|
+
---
|
|
376
|
+
|
|
377
|
+
## Usage Examples
|
|
378
|
+
|
|
379
|
+
### Initialize in Your App
|
|
130
380
|
|
|
131
381
|
```typescript
|
|
132
|
-
//
|
|
382
|
+
// app.ts or index.ts
|
|
133
383
|
import { createLogoPulse } from '@logopulse/sdk';
|
|
134
384
|
|
|
135
385
|
createLogoPulse({
|
|
136
|
-
apiUrl: process.env.LOGOPULSE_API_URL,
|
|
137
386
|
apiKey: process.env.LOGOPULSE_API_KEY,
|
|
138
387
|
orgId: process.env.LOGOPULSE_ORG_ID,
|
|
139
388
|
});
|
|
389
|
+
```
|
|
140
390
|
|
|
141
|
-
|
|
391
|
+
### Use in Your Services
|
|
392
|
+
|
|
393
|
+
```typescript
|
|
142
394
|
import { getLogoPulse } from '@logopulse/sdk';
|
|
143
395
|
|
|
144
|
-
export class
|
|
145
|
-
async
|
|
146
|
-
const
|
|
396
|
+
export class OrderService {
|
|
397
|
+
async createOrder(accountId: string, data: CreateOrderData) {
|
|
398
|
+
const order = await db.orders.create(data);
|
|
147
399
|
|
|
148
|
-
// Track analytics (non-blocking, errors logged
|
|
400
|
+
// Track analytics (non-blocking, errors logged)
|
|
149
401
|
getLogoPulse()
|
|
150
|
-
.track('
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
quantity: batch.quantity
|
|
402
|
+
.track('order.created', accountId, {
|
|
403
|
+
orderId: order.id,
|
|
404
|
+
amount: order.total,
|
|
154
405
|
})
|
|
155
|
-
.catch(
|
|
406
|
+
.catch(console.error);
|
|
156
407
|
|
|
157
|
-
return
|
|
408
|
+
return order;
|
|
158
409
|
}
|
|
159
410
|
}
|
|
160
411
|
```
|
|
161
412
|
|
|
413
|
+
### Customer Onboarding Flow
|
|
414
|
+
|
|
415
|
+
```typescript
|
|
416
|
+
// 1. New company signs up
|
|
417
|
+
await logoPulse.createCustomer({
|
|
418
|
+
accountId: 'account-123',
|
|
419
|
+
companyName: 'Acme Corp',
|
|
420
|
+
ownerEmail: 'owner@acme.com',
|
|
421
|
+
});
|
|
422
|
+
|
|
423
|
+
// 2. Start trial
|
|
424
|
+
await logoPulse.trialStarted('account-123', {
|
|
425
|
+
trialEndsAt: '2026-02-05T00:00:00Z',
|
|
426
|
+
});
|
|
427
|
+
|
|
428
|
+
// 3. Connect integration
|
|
429
|
+
await logoPulse.integrationConnected('account-123', {
|
|
430
|
+
integrationName: 'stripe',
|
|
431
|
+
});
|
|
432
|
+
|
|
433
|
+
// 4. Create first entity
|
|
434
|
+
await logoPulse.track('product.created', 'account-123', {
|
|
435
|
+
productId: 'prod-789',
|
|
436
|
+
});
|
|
437
|
+
|
|
438
|
+
// 5. Convert to paid
|
|
439
|
+
await logoPulse.trialEnded('account-123', { converted: true });
|
|
440
|
+
await logoPulse.subscriptionStarted('account-123', {
|
|
441
|
+
plan: 'pro',
|
|
442
|
+
amount: 99.00,
|
|
443
|
+
});
|
|
444
|
+
```
|
|
445
|
+
|
|
446
|
+
---
|
|
447
|
+
|
|
162
448
|
## Error Handling
|
|
163
449
|
|
|
164
|
-
The SDK
|
|
450
|
+
The SDK logs errors but doesn't throw, so analytics failures won't break your app.
|
|
165
451
|
|
|
166
452
|
```typescript
|
|
167
|
-
//
|
|
168
|
-
await
|
|
453
|
+
// Errors are caught and logged internally
|
|
454
|
+
await logoPulse.track('order.created', accountId, data);
|
|
169
455
|
// Your code continues even if tracking fails
|
|
170
456
|
```
|
|
171
457
|
|
|
458
|
+
---
|
|
459
|
+
|
|
172
460
|
## Environment Variables
|
|
173
461
|
|
|
174
|
-
Set `SERVICE_NAME`
|
|
462
|
+
Set `SERVICE_NAME` to automatically tag events with their source:
|
|
175
463
|
|
|
176
464
|
```bash
|
|
177
|
-
export SERVICE_NAME=
|
|
465
|
+
export SERVICE_NAME=api-service
|
|
178
466
|
```
|
|
179
467
|
|
|
468
|
+
---
|
|
469
|
+
|
|
470
|
+
## TypeScript Support
|
|
471
|
+
|
|
472
|
+
Full TypeScript definitions included.
|
|
473
|
+
|
|
474
|
+
```typescript
|
|
475
|
+
import { LogoPulseConfig, CustomerAccount, User } from '@logopulse/sdk';
|
|
476
|
+
```
|
|
477
|
+
|
|
478
|
+
---
|
|
479
|
+
|
|
180
480
|
## License
|
|
181
481
|
|
|
182
482
|
MIT
|
package/dist/index.d.ts
CHANGED
|
@@ -183,12 +183,41 @@ export declare class LogoPulse {
|
|
|
183
183
|
amount?: number;
|
|
184
184
|
}): Promise<void>;
|
|
185
185
|
/**
|
|
186
|
-
* Track
|
|
186
|
+
* Track subscription upgraded
|
|
187
187
|
*/
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
188
|
+
subscriptionUpgraded(accountId: string, data: {
|
|
189
|
+
plan: string;
|
|
190
|
+
amount?: number;
|
|
191
191
|
}): Promise<void>;
|
|
192
|
+
/**
|
|
193
|
+
* Track subscription downgraded
|
|
194
|
+
*/
|
|
195
|
+
subscriptionDowngraded(accountId: string, data: {
|
|
196
|
+
plan: string;
|
|
197
|
+
amount?: number;
|
|
198
|
+
}): Promise<void>;
|
|
199
|
+
/**
|
|
200
|
+
* Track trial started
|
|
201
|
+
*/
|
|
202
|
+
trialStarted(accountId: string, data: {
|
|
203
|
+
plan?: string;
|
|
204
|
+
trialEndsAt?: string;
|
|
205
|
+
}): Promise<void>;
|
|
206
|
+
/**
|
|
207
|
+
* Track trial ended (converted to paid)
|
|
208
|
+
*/
|
|
209
|
+
trialEnded(accountId: string, data?: {
|
|
210
|
+
converted?: boolean;
|
|
211
|
+
}): Promise<void>;
|
|
212
|
+
/**
|
|
213
|
+
* Track trial expired (not converted)
|
|
214
|
+
*/
|
|
215
|
+
trialExpired(accountId: string): Promise<void>;
|
|
216
|
+
/**
|
|
217
|
+
* Track feature adoption manually
|
|
218
|
+
* Use this for features that aren't automatically tracked via entity-to-feature mapping
|
|
219
|
+
*/
|
|
220
|
+
trackFeature(accountId: string, featureName: string): Promise<void>;
|
|
192
221
|
}
|
|
193
222
|
export declare function createLogoPulse(config: LogoPulseConfig): LogoPulse;
|
|
194
223
|
export declare function getLogoPulse(): LogoPulse;
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAQA,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,cAAc;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;CACl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C,IAAI,CAAC;IAIvG;;OAEG;IACG,YAAY,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAInG;;OAEG;IACG,UAAU,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAIlF;;OAEG;IACG,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIpD;;;OAGG;IACG,YAAY,CAAC,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAI1E;AAOD,wBAAgB,eAAe,CAAC,MAAM,EAAE,eAAe,GAAG,SAAS,CAGlE;AAED,wBAAgB,YAAY,IAAI,SAAS,CAKxC"}
|
package/dist/index.js
CHANGED
|
@@ -178,10 +178,41 @@ class LogoPulse {
|
|
|
178
178
|
await this.track('subscription.renewed', accountId, data);
|
|
179
179
|
}
|
|
180
180
|
/**
|
|
181
|
-
* Track
|
|
181
|
+
* Track subscription upgraded
|
|
182
182
|
*/
|
|
183
|
-
async
|
|
184
|
-
await this.track('
|
|
183
|
+
async subscriptionUpgraded(accountId, data) {
|
|
184
|
+
await this.track('subscription.upgraded', accountId, data);
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Track subscription downgraded
|
|
188
|
+
*/
|
|
189
|
+
async subscriptionDowngraded(accountId, data) {
|
|
190
|
+
await this.track('subscription.downgraded', accountId, data);
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* Track trial started
|
|
194
|
+
*/
|
|
195
|
+
async trialStarted(accountId, data) {
|
|
196
|
+
await this.track('trial.started', accountId, data);
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* Track trial ended (converted to paid)
|
|
200
|
+
*/
|
|
201
|
+
async trialEnded(accountId, data) {
|
|
202
|
+
await this.track('trial.ended', accountId, data);
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* Track trial expired (not converted)
|
|
206
|
+
*/
|
|
207
|
+
async trialExpired(accountId) {
|
|
208
|
+
await this.track('trial.expired', accountId, { converted: false });
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* Track feature adoption manually
|
|
212
|
+
* Use this for features that aren't automatically tracked via entity-to-feature mapping
|
|
213
|
+
*/
|
|
214
|
+
async trackFeature(accountId, featureName) {
|
|
215
|
+
await this.track('feature.tracked', accountId, { featureName });
|
|
185
216
|
}
|
|
186
217
|
}
|
|
187
218
|
exports.LogoPulse = LogoPulse;
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;AAuTA,0CAGC;AAED,oCAKC;AAjUD,kDAA6C;AAE7C;;;GAGG;AACH,MAAM,iBAAiB,GAAG,mEAAmE,CAAC;AAqD9F;;;GAGG;AACU,QAAA,eAAe,GAAG;IAC7B,oBAAoB;IACpB,OAAO,EAAE,SAAS;IAClB,KAAK,EAAE,OAAO;IAEd,eAAe;IACf,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAElB,UAAU;IACV,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,SAAS,EAAE,WAAW;IAEtB,kBAAkB;IAClB,QAAQ,EAAE,UAAU;IACpB,UAAU,EAAE,YAAY;IACxB,QAAQ,EAAE,UAAU;IACpB,QAAQ,EAAE,UAAU;IACpB,SAAS,EAAE,WAAW;IAEtB,aAAa;IACb,SAAS,EAAE,WAAW;IACtB,MAAM,EAAE,QAAQ;IAChB,MA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