Skip to content

Commit cd2147c

Browse files
committed
fixes
1 parent 1c55516 commit cd2147c

File tree

1 file changed

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

1 file changed

+14
-5
lines changed

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

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ You need to set up two important parts, regardless of the CDN provider you use:
3131
## Set up
3232

3333
There are 2 options you can choose from when you set up your custom domain proxy.
34-
1. [Use CloudFront](#cloudfront)
35-
2. [Use a custom CDN or API proxy]
34+
1. [CloudFront](#cloudfront)
35+
2. [Custom CDN or API proxy](#custom-cdn--api-proxy)
3636

37-
Follow the directions listed for [CloudFront](#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:
37+
Follow the directions listed for [CloudFront](#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:
3838

3939
```text
4040
Hi,
@@ -92,9 +92,18 @@ const analytics = AnalyticsBrowser.load(
9292
### Snippet instructions
9393
If you're a snippet user, you need to modify the [analytics snippet](/docs/getting-started/02-simple-install/#step-1-copy-the-snippet) that's inside your `<head>`.
9494

95-
To proxy settings and destination requests that typically go to `http://cdn.segment.com`, replace: `t.src="https://cdn.segment.com/analytics.js/v1/" + key + "/analytics.min.js"` with `t.src="https://MY-CUSTOM-CDN-PROXY.com" + key + "/analytics.min.js"`
95+
To proxy settings and destination requests that typically go to `http://cdn.segment.com`, replace:
96+
```diff
97+
- t.src="https://cdn.segment.com/analytics.js/v1/" + key + "/analytics.min.js"
98+
+ t.src="https://MY-CUSTOM-CDN-PROXY.com" + key + "/analytics.min.js"
99+
```
100+
101+
To proxy tracking calls that typically go to `api.segment.io/v1`, replace:
102+
```diff
103+
- analytics.load("<MY_WRITE_KEY>")
104+
+ analytics.load("<MY_WRITE_KEY>", { integrations: { "Segment.io": { apiHost: "MY-CUSTOM-API-PROXY.com" }}})
105+
```
96106

97-
To proxy tracking calls that typically go to `api.segment.io/v1`, replace `analytics.load("<MY_WRITE_KEY>")` with `analytics.load("<MY_WRITE_KEY>", { integrations: { "Segment.io": { apiHost: "MY-CUSTOM-API-PROXY.com" }}})`
98107

99108
## CloudFront
100109

0 commit comments

Comments
 (0)