Skip to content

Commit 3b5d3d4

Browse files
committed
Custom proxy edits
1 parent a78bd44 commit 3b5d3d4

File tree

1 file changed

+18
-18
lines changed
  • src/connections/sources/catalog/libraries/website/javascript

1 file changed

+18
-18
lines changed

src/connections/sources/catalog/libraries/website/javascript/custom-proxy.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -13,41 +13,41 @@ You cannot use custom proxy setup for Analytics.js CDN or Tracking API with devi
1313
1414
{% include content/domain-delegation-solutions.md %}
1515

16-
## Custom Proxy prerequisites
16+
## Custom proxy prerequisites
1717

1818
To set up a custom proxy, you need:
1919

20-
- Access to your site DNS settings
20+
- Access to your site's DNS settings
2121
- A CDN you can serve assets from
2222
- Access to the CDN settings
2323
- A security certificate for the proxy domain
2424

25-
> info "Custom Proxy Troubleshooting"
25+
> info "Custom proxy troubleshooting"
2626
> If you experience issues configuring a custom proxy, contact your organization's IT department for help. Segment does not have access to the resources you need to configure a custom proxy.
2727
2828
This guide explains how to set up a custom proxy in CloudFront. You can apply these principles to almost any modern CDN that supports proxies.
2929

3030
You need to set up two important parts, regardless of the CDN provider you use:
3131

3232
- Proxy to Segment CDN (`cdn.segment.com`)
33-
- Proxy to Segment tracking API (`api.segment.io`)
33+
- Proxy to Segment Tracking API (`api.segment.io`)
3434

3535
> warning ""
36-
> If you are using a [Regional Workspace](/docs/guides/regional-segment/#client-side-sources), please note that instead of using `api.segment.io` to proxy the Tracking API, you'll be using `events.eu1.segmentapis.com`
36+
> If you are using a [Regional Workspace](/docs/guides/regional-segment/#client-side-sources), please note that instead of using `api.segment.io` to proxy the Tracking API, you'll be using `events.eu1.segmentapis.com`.
3737
3838
> info ""
3939
> Segment only has the ability to enable the proxy setting for the Web (Analytics.js) source. Details for mobile source proxies are in the [Analytics-iOS](/docs/connections/sources/catalog/libraries/mobile/ios/#proxy-https-calls) and [Analytics-Android](/docs/connections/sources/catalog/libraries/mobile/android/#proxying-http-calls) documentation. It is not currently possible to set up a proxy for server sources using the Segment UI.
4040
4141
> info "Segment loads most integrations through the proxy, except for third-party SDKs"
4242
> Third-party SDKs are loaded by a partner's CDN, even with a Segment proxy configured. For example, if you have a Segment custom proxy enabled and send data to a FullStory destination, FullStory's CDN would load the FullStory SDK.
4343
44-
## Custom Proxy setup
44+
## Custom proxy setup
4545

46-
There are two options you can choose from when you set up your custom domain proxy.
46+
There are two options you can choose from when you set up your custom domain proxy:
4747
1. [CloudFront](#custom-proxy-cloudfront)
4848
2. [Custom CDN or API proxy](#custom-cdn--api-proxy)
4949

50-
Follow the directions listed for [CloudFront](#custom-proxy-cloudfront) or [use your own CDN setup](#custom-cdn--api-proxy). Once you complete those steps and verify that your proxy works for both `cdn.segment.com` and `api.segment.io`, [contact Segment Product Support](https://segment.com/help/contact/) with the following template email:
50+
Follow the directions listed for [CloudFront](#custom-proxy-cloudfront) or [use your own CDN setup](#custom-cdn--api-proxy). Once you complete those steps and verify that your proxy works for both `cdn.segment.com` and `api.segment.io`, [contact Segment Product Support](https://segment.com/help/contact/){:target="_blank"} with the following template email:
5151

5252
```text
5353
Hi,
@@ -61,7 +61,7 @@ This is {person} from {company}. I would like to configure a proxy for the follo
6161

6262
Double-check the Source URL and the Source ID.
6363

64-
A Segment Customer Success team member will respond that they have enabled this option for your account. When you receive this confirmation, open the source in your workspace, and navigate to Settings > Analytics.js. Update the **Host Address** setting from `api.segment.io/v1` to `[your proxy host]/v1`.
64+
A Segment Customer Success team member will respond that they have enabled this option for your account. When you receive this confirmation, open the source in your workspace, and navigate to **Settings > Analytics.js**. Update the **Host Address** setting from `api.segment.io/v1` to `[your proxy host]/v1`.
6565

6666
> info ""
6767
> The **Host Address** field does not appear in source settings until it's enabled by Segment Customer Success.
@@ -130,12 +130,12 @@ const analytics = AnalyticsBrowser.load(
130130
)
131131
```
132132

133-
## Custom Proxy CloudFront
133+
## Custom proxy CloudFront
134134

135135
These instructions refer to Amazon CloudFront, but apply more generally to other providers as well. Before changing the Segment Tracking API or the Segment snippet (Segment CDN) to use your new proxy, complete the custom domain proxy setup on your side to avoid any unexpected behavior.
136136

137-
### CDN Proxy
138-
To set up your CDN Proxy:
137+
### CDN proxy
138+
To set up your CDN proxy:
139139
1. Log in to the AWS console and navigate to CloudFront.
140140
2. Click **Create Distribution**.
141141
3. Configure the distribution settings. In the Origin section, update the following values:
@@ -164,7 +164,7 @@ To add a CNAME record for the Segment proxy to your organizations DNS settings:
164164

165165

166166

167-
### Tracking API Proxy
167+
### Tracking API proxy
168168

169169
As events travel through the proxy before reaching the tracking API, set up a proxy for the tracking API so that all calls proxy through your domain. To do this, set up a CloudFront distribution that's similar to the one in the previous section, with the exception of the Origin Domain Name:
170170

@@ -188,7 +188,7 @@ These are some common issues that occur for customers implementing a custom prox
188188

189189
#### Cloudflare returning a 403 error
190190

191-
A 403 error can mean that you've misconfigured your Cloudflare CDN distribution. Try one of the following options to fix the error:
191+
A `403` error can mean that you've misconfigured your Cloudflare CDN distribution. Try one of the following options to fix the error:
192192

193193
1. If you have a Cloudflare enterprise plan, create a Page Rule in Cloudflare so that Segment's CDN doesn't refuse the requests made through the Cloudflare Proxy. If `cdn.segment.com` is another CNAME that resolves to `xxx.cloudfront.net`, you will need to use a Page Rule in Cloudflare to override the host header to match the hostname for proxy requests. For more information about overriding the host header, see Cloudflare’s [Rewrite Host headers](https://developers.cloudflare.com/rules/page-rules/how-to/rewrite-host-headers/){:target="_blank”} docs.
194194

@@ -209,7 +209,7 @@ In order to resolve a CORS OPTIONS pre-request fetch error, you must specify "St
209209

210210
#### CloudFront Proxy returning a 403 error
211211

212-
If your CloudFront Proxy is returing a 403 error, the following change in CloudFront might resolve the issue:
212+
If your CloudFront Proxy is returning a `403` error, the following change in CloudFront might resolve the issue:
213213

214214
```ts
215215
Before:
@@ -254,9 +254,9 @@ analytics.load({
254254

255255
## Restore the API host to the Segment default
256256

257-
If you wish to restore the proxied API host to it's original value:
258-
1. Navigate to the **Source > Settings > Analytis.js tab**
257+
If you wish to restore the proxied API host to its original value:
258+
1. Navigate to the **Source > Settings > Analytics.js tab**
259259
2. Scroll down until you see the Host address field.
260260
3. Under the field, there is a small blue text that says 'Restore to a default value'. Click **Restore** and then **Save**.
261261

262-
Any changes made to the CDN host must be update manually in your code.
262+
Any changes made to the CDN host must be updated manually in your code.

0 commit comments

Comments
 (0)