You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Event listeners allow capturing different events that happen in the Browser SDK.
They are useful for a number of things like building client side
integrations to analytics or error-logging systems.
Copy file name to clipboardExpand all lines: packages/browser-sdk/README.md
+28-1Lines changed: 28 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -294,7 +294,7 @@ Bucket can assist you with collecting your user's feedback by offering a pre-bui
294
294
295
295
Feedback can be submitted to Bucket using the SDK:
296
296
297
-
```js
297
+
```ts
298
298
bucketClient.feedback({
299
299
featureId: "my_feature_id", // String (required), copy from Feature feedback tab
300
300
score: 5, // Number: 1-5 (optional)
@@ -308,6 +308,33 @@ If you are not using the Bucket Browser SDK, you can still submit feedback using
308
308
309
309
See details in [Feedback HTTP API](https://docs.bucket.co/reference/http-tracking-api#feedback)
310
310
311
+
### Event listeners
312
+
313
+
Event listeners allow for capturing various events occurring in the `BucketClient`. This is useful to build integrations with other system or for various debugging purposes. There are 5 kinds of events:
314
+
315
+
- FeaturesUpdated
316
+
- User
317
+
- Company
318
+
- Check
319
+
- Track
320
+
321
+
Use the `on()` method to add an event listener to respond to certain events. See the API reference for details on each hook.
0 commit comments