Skip to content

Commit d4b9df1

Browse files
committed
docs
1 parent e65f2df commit d4b9df1

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

packages/browser-sdk/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ type Configuration = {
109109
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
110110
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
111111
};
112+
hooks?: Hooks[] | Hooks[][]; // See the "Hooks" section below.
112113
};
113114
```
114115

@@ -308,6 +309,18 @@ If you are not using the Bucket Browser SDK, you can still submit feedback using
308309

309310
See details in [Feedback HTTP API](https://docs.bucket.co/reference/http-tracking-api#feedback)
310311

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+
311324
### Zero PII
312325

313326
The Bucket Browser SDK doesn't collect any metadata and HTTP IP addresses are _not_ being stored.

0 commit comments

Comments
 (0)