Skip to content

Commit 151a58f

Browse files
authored
Update README.md
1 parent a0ee5eb commit 151a58f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/browser/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,8 @@ and can be of five different types:
254254
Here is an example of a simple plugin that would convert all track events event names to lowercase before the event gets sent through the rest of the pipeline:
255255

256256
```ts
257+
import type { Plugin } from '@segment/analytics-next'
258+
257259
export const lowercase: Plugin = {
258260
name: 'Lowercase Event Name',
259261
type: 'before',
@@ -267,6 +269,8 @@ export const lowercase: Plugin = {
267269
return ctx
268270
}
269271
}
272+
273+
analytics.register(lowercase)
270274
```
271275

272276
For further examples check out our [existing plugins](/packages/browser/src/plugins).

0 commit comments

Comments
 (0)