Skip to content

Commit d713c82

Browse files
committed
update readme for customizer
1 parent 202c2eb commit d713c82

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

analytics-spring-boot-starter/README.adoc

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,17 @@ In your Spring Boot configuration (`application.properties`, environment, or
2525
similar), provide the property `segment.analytics.writeKey`. The
2626
autoconfiguration will register an `Analytics` bean in the Spring context
2727
ready for use.
28+
29+
=== Customization
30+
31+
To customize the `Analytics` client you can define a `SegmentAnalyticsCustomizer` bean,
32+
which receives the builder instance.
33+
34+
For example if you want to use a regional endpoint you can define a customizer like so:
35+
36+
```java
37+
@Bean
38+
SegmentAnalyticsCustomizer segmentAnalyticsCustomizer() {
39+
return builder -> builder.endpoint("events.eu1.segmentapis.com");
40+
}
41+
```

0 commit comments

Comments
 (0)