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
Copy file name to clipboardExpand all lines: packages/browser-sdk/README.md
+13Lines changed: 13 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -109,6 +109,7 @@ type Configuration = {
109
109
staleTimeMs?:number; // at initialization time features are loaded from the cache unless they have gone stale. Defaults to 0 which means the cache is disabled. Increase in the case of a non-SPA
110
110
expireTimeMs?:number; // In case we're unable to fetch features from Bucket, cached/stale features will be used instead until they expire after `expireTimeMs`. Default is 30 days
111
111
};
112
+
hooks?:Hooks[] |Hooks[][]; // See the "Hooks" section below.
112
113
};
113
114
```
114
115
@@ -308,6 +309,18 @@ If you are not using the Bucket Browser SDK, you can still submit feedback using
308
309
309
310
See details in [Feedback HTTP API](https://docs.bucket.co/reference/http-tracking-api#feedback)
310
311
312
+
### Hooks
313
+
314
+
Hooks allow for capturing various events occurring in the BucketClient. There are 5 kinds of events:
315
+
316
+
- FeaturesUpdated
317
+
- User
318
+
- Company
319
+
- Check
320
+
- Track
321
+
322
+
Supply a list of `Hook`s in the BucketClient constructor or use the `on()` method to add a hook after construction. See the API reference for details on each hook.
323
+
311
324
### Zero PII
312
325
313
326
The Bucket Browser SDK doesn't collect any metadata and HTTP IP addresses are _not_ being stored.
0 commit comments