Skip to content

Commit ab788fb

Browse files
committed
add better code comments [netlify-build]
1 parent f4ff5ff commit ab788fb

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

src/guides/regional-segment.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -63,23 +63,23 @@ Use the examples in this section to configure mobile SDKs to point to the EU end
6363
{% codeexample %}
6464
{% codeexampletab iOS/Android/Xamarin/Flutter %}
6565
```js
66-
// Pseudocode exampleset these options using your platform's syntax
66+
// Example configurationrefer to your platform's SDK docs for full option list
6767
const analytics = new Analytics({
68-
writeKey: '<YOUR_WRITE_KEY>',
69-
apiHost: "events.eu1.segmentapis.com/v1",
70-
// other options...
68+
writeKey: '<YOUR_WRITE_KEY>', // Required: your source's write key from Segment
69+
apiHost: "events.eu1.segmentapis.com/v1", // Routes data through EU endpoint
70+
// You can also configure options like flushInterval, debug, or storage providers
7171
})
7272
```
7373
{% endcodeexampletab %}
7474

7575
{% codeexampletab React Native %}
7676
```js
77-
// Pseudocode exampleset these options using your platform's syntax
77+
// Example configurationrefer to your platform's SDK docs for full option list
7878
const analytics = new Analytics({
79-
writeKey: '<YOUR_WRITE_KEY>',
80-
proxy: "https://events.eu1.segmentapis.com/v1",
81-
useSegmentEndpoints: true,
82-
// other options...
79+
writeKey: '<YOUR_WRITE_KEY>', // Required: must belong to an EU workspace
80+
proxy: "https://events.eu1.segmentapis.com/v1", // Required for EU data routing
81+
useSegmentEndpoints: true, // Ensures proxy is used instead of default US host
82+
// You can also set options like flushInterval or trackAppLifecycleEvents
8383
})
8484
```
8585
{% endcodeexampletab %}
@@ -105,18 +105,18 @@ Use this example to configure your SDK:
105105
{% codeexample %}
106106
{% codeexampletab Node.js/Python/Java SDKs %}
107107
```js
108-
// Pseudocode — set these options using your platform's syntax
108+
// Example configuration — adjust for your SDK's syntax
109109
const analytics = new Analytics({
110-
writeKey: '<YOUR_WRITE_KEY>',
111-
host: "https://events.eu1.segmentapis.com",
112-
// other options...
110+
writeKey: '<YOUR_WRITE_KEY>', // Required: must belong to an EU workspace
111+
host: "https://events.eu1.segmentapis.com", // EU endpoint — do not include /v1 for these SDKs
112+
// You can configure other options like flushInterval or request retries
113113
})
114114
```
115115
{% endcodeexampletab %}
116116
{% endcodeexample %}
117117

118-
> info "C# SDK"
119-
> If you're using the C# SDK, you must manually append /v1 to the host URL: `https://events.eu1.segmentapis.com/v1`.
118+
> info "Endpoint format for server-side SDKs"
119+
> Most SDKs handle the `/v1` path internally. However, only the C# SDK and custom HTTP requests require you to add `/v1` manually. like `https://events.eu1.segmentapis.com/v1`.
120120
121121
#### Custom HTTP requests
122122

0 commit comments

Comments
 (0)