@product7/product7-js 0.4.1 → 0.4.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 CHANGED
@@ -39,7 +39,9 @@ await sdk.identify({
39
39
  user_id: 'user_123',
40
40
  email: 'user@example.com',
41
41
  name: 'Jane Doe',
42
- custom_fields: { plan: 'pro' },
42
+ avatar: 'https://example.com/avatar.png', // optional
43
+ attributes: { plan: 'pro', role: 'admin' }, // optional, for segmentation
44
+ company: { id: 'company_123', name: 'Acme Inc' }, // optional
43
45
  });
44
46
 
45
47
  const widget = sdk.createFeedbackWidget({ position: 'bottom-right' });
@@ -135,7 +137,14 @@ await sdk.identify({
135
137
  user_id: 'user_123', // required: user_id or email
136
138
  email: 'user@example.com',
137
139
  name: 'Jane Doe',
138
- custom_fields: { plan: 'pro' },
140
+ avatar: 'https://...', // optional
141
+ attributes: { plan: 'pro', role: 'admin' }, // optional, for segmentation
142
+ company: {
143
+ // optional
144
+ id: 'company_123',
145
+ name: 'Acme Inc',
146
+ monthly_spend: 99.99,
147
+ },
139
148
  });
140
149
  ```
141
150
 
package/dist/README.md CHANGED
@@ -39,7 +39,9 @@ await sdk.identify({
39
39
  user_id: 'user_123',
40
40
  email: 'user@example.com',
41
41
  name: 'Jane Doe',
42
- custom_fields: { plan: 'pro' },
42
+ avatar: 'https://example.com/avatar.png', // optional
43
+ attributes: { plan: 'pro', role: 'admin' }, // optional, for segmentation
44
+ company: { id: 'company_123', name: 'Acme Inc' }, // optional
43
45
  });
44
46
 
45
47
  const widget = sdk.createFeedbackWidget({ position: 'bottom-right' });
@@ -135,7 +137,14 @@ await sdk.identify({
135
137
  user_id: 'user_123', // required: user_id or email
136
138
  email: 'user@example.com',
137
139
  name: 'Jane Doe',
138
- custom_fields: { plan: 'pro' },
140
+ avatar: 'https://...', // optional
141
+ attributes: { plan: 'pro', role: 'admin' }, // optional, for segmentation
142
+ company: {
143
+ // optional
144
+ id: 'company_123',
145
+ name: 'Acme Inc',
146
+ monthly_spend: 99.99,
147
+ },
139
148
  });
140
149
  ```
141
150