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/connections/sources/catalog/libraries/website/javascript/custom-proxy.md
+14-6Lines changed: 14 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,9 +30,11 @@ You need to set up two important parts, regardless of the CDN provider you use:
30
30
31
31
## Set up
32
32
33
-
**Option 1**
33
+
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
36
35
-
Follow the directions listed for CloudFront or use your own CDN setup. 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:
36
38
37
39
```text
38
40
Hi,
@@ -53,11 +55,10 @@ A Segment Customer Success team member will respond that they have enabled this
53
55
> info ""
54
56
> The **Host Address** field does not appear in source settings until it's enabled by Segment Customer Success.
55
57
56
-
**Option 2**
57
58
58
59
## Custom CDN / API Proxy
59
60
60
-
You can proxy settings and destination requests that typically go to `http://cdn.segment.com` through a custom proxy.
61
+
Proxy settings and destination requests that typically go to `http://cdn.segment.com` through a custom proxy.
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>`.
94
+
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"`
96
+
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" }}})`
98
+
91
99
## CloudFront
92
100
93
101
These instructions refer to Amazon CloudFront, but apply more generally to other providers as well.
0 commit comments