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: src/guides/regional-segment.md
+22-54Lines changed: 22 additions & 54 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,22 +21,18 @@ If you need EU data residency, you must either create a workspace in the EU or r
21
21
22
22
Regional Data Ingestion enables you to send data to Segment from both Device-mode and Cloud-mode sources through regionally hosted API ingest points. The regional infrastructure can fail-over across locations within a region, but never across regions.
23
23
24
-
### Cloud-event sources
25
-
26
-
{% include content/eu-cloud-event-sources.html %}
27
-
28
-
### Configuring Segment Sources
24
+
## Configuring Segment sources for mobile SDKs
29
25
30
26
To send data from mobile apps to the correct region, you must update your SDK configuration to use the right endpoint. You must do this even if your source settings are already configured in Segment itself.
31
27
32
28
> warning "Use the correct endpoint"
33
-
> Starting in Q2 2025, Segment will reject data sent to the wrong region. Your SDK must be configured to send data to the correct regional endpoint to prevent dropped events.
29
+
> Starting in Q2 2025, Segment will reject data sent to the wrong region. Make sure your mobile SDK is configured to send data to the correct endpoint for your workspace region.
34
30
35
31
Segment's EU instance only supports data ingestion through the Dublin region, using this endpoint:
36
32
37
33
`https://events.eu1.segmentapis.com/v1`
38
34
39
-
####SDK configuration examples
35
+
### SDK configuration examples
40
36
41
37
Use the examples in this section to configure mobile SDKs to point to the EU endpoint. These examples use JavaScript-style syntax for clarity. Refer to your platform's documentation for exact implementation.
42
38
@@ -69,75 +65,47 @@ If you're using the Segment EU endpoint with Analytics-C# source, you must manua
69
65
70
66
For workspaces using the `EU WEST` data processing region, the Dublin ingestion region is preselected for all sources.
71
67
72
-
To route data from your client-side sources to the correct region, you'll need to make two updates:
73
-
74
-
1. Update your SDK configuration (in code).
75
-
2. Update your source settings (in Segment).
76
-
77
-
#### Update your SDK configuration
78
-
79
-
Segment client-side SDKs (like Analytics.js, iOS, and Android) typically fetch updated settings, including the right ingestion endpoint. However, mobile apps may not always apply these changes right away.
68
+
## Configure server-side and custom Segment sources
80
69
81
-
To avoid data being sent to the wrong region, **you must add the correct endpoint configuration directly in your SDK setup.**
70
+
If you're using Segment’s server-side SDKs (like Node.js, Python, and Java) or making direct HTTP API requests, you’ll need to update the endpoint your data is sent to. This is required to match your workspace’s region and avoid rejected traffic.
82
71
72
+
> warning "Use the correct endpoint"
73
+
> Starting in Q2 2025, Segment will reject data sent to the wrong region. Make sure your server-side SDKs and custom integrations are configured to send data to the correct endpoint for your workspace region.
83
74
75
+
### SDK configuration examples
84
76
85
-
Use the following code examples to point your SDK to the EU endpoint:
77
+
Use this example to configure your SDK:
86
78
87
79
{% codeexample %}
88
-
{% codeexampletab iOS/Android/Xamarin/Flutter %}
89
-
```js
90
-
// Pseudocode example — set these options using your platform's syntax
91
-
constanalytics=newAnalytics({
92
-
writeKey:'<YOUR_WRITE_KEY>',
93
-
apiHost:"events.eu1.segmentapis.com/v1",
94
-
// other options...
95
-
})
96
-
```
97
-
{% endcodeexampletab %}
98
-
99
-
{% codeexampletab React Native %}
80
+
{% codeexampletab Node.js/Python/Java SDKs %}
100
81
```js
101
-
// Pseudocode example — set these options using your platform's syntax
82
+
// Pseudocode — set these options using your platform's syntax
102
83
constanalytics=newAnalytics({
103
84
writeKey:'<YOUR_WRITE_KEY>',
104
-
proxy:"https://events.eu1.segmentapis.com/v1",
105
-
useSegmentEndpoints:true,
85
+
host:"https://events.eu1.segmentapis.com",
106
86
// other options...
107
87
})
108
88
```
109
89
{% endcodeexampletab %}
110
90
{% endcodeexample %}
111
91
112
-
#### 2. Update source settings in Segment
92
+
> info "C# SDK"
93
+
> If you're using the C# SDK, you must manually append /v1 to the host URL: `https://events.eu1.segmentapis.com/v1`.
113
94
114
-
After making the required changes in your code, update the source's settings in the Segment UI:
95
+
### Custom HTTP requests
115
96
116
-
1. Go to your source.
117
-
2. Select the **Settings** tab.
118
-
3. Click **Regional Settings**.
119
-
4. Choose your **Data Ingestion Region**.
120
-
- If you're in the *US West* data processing region, you can select from: Dublin, Singapore, Oregon, and Sydney.
121
-
- If you're in the *EU West* data processing region, Segment's EU instance only supports data ingestion from Dublin with the `events.eu1.segmentapis.com/` endpoint.
97
+
If you're sending data using custom HTTP requests or through a proxy and you’ve reused a write key originally issued for a US-based workspace, you’ll need to do the following:
122
98
123
-
All regions are configured on a **per-source** basis. You’ll need to set the region for each source individually if you don’t want to rely on the default.
124
-
125
-
> info ""
126
-
> For workspaces that use the EU West Data Processing region, the Dublin Ingestion region is preselected for all sources.
99
+
- Update your request target to: `https://events.eu1.segmentapis.com/v1`.
100
+
- Make sure the write key belongs to an EU workspace.
127
101
128
-
### Server-side and project sources
129
-
When you send data from a server-side or project source, you can use the `host` configuration parameter to send data to the desired region:
**Data sent to the EU endpoint using a US-region write key will get rejected**.
132
103
133
-
> success ""
134
-
> If you are using the Segment EU endpoint with an Analytics-C# source, you must manually append `v1` to the URL. For instance, `events.eu1.segmentapis.com/v1`.
104
+
### Cloud-event sources
135
105
136
-
Here is an example of how to set the host:
106
+
{% include content/eu-cloud-event-sources.html %}
137
107
138
-
```json
139
-
Analytics.Initialize("<YOUR WRITEKEY HERE>", new Config().SetHost("https://events.eu1.segmentapis.com (https://events.eu1.segmentapis.com/)"));
140
-
```
108
+
Segment maintains and hosts these sources, and they don't require SDK-level configuration. If you're using other cloud sources not listed here, they may only be available in US-based workspaces. Reach out to Segment Support if you're unsure whether a cloud source is supported in the EU.
0 commit comments