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
* Update custom-proxy.md
* Updated the page title and Self Hosting section
Renaming the page, so it includes the new option that's being added.
Fixing the link to the NPM instructions.
* Update src/connections/sources/catalog/libraries/website/javascript/custom-proxy.md
Co-authored-by: markzegarelli <[email protected]>
* Update src/connections/sources/catalog/libraries/website/javascript/custom-proxy.md
---------
Co-authored-by: prigiattiperrut <[email protected]>
Co-authored-by: markzegarelli <[email protected]>
Custom domains allow you to proxy Analytics.js and proxy all tracking event requests through your domain.
8
8
9
-
## Prerequisites
9
+
## Custom Proxy Prerequisites
10
10
11
11
To set up a custom domain, you need:
12
12
@@ -31,7 +31,7 @@ You need to set up two important parts, regardless of the CDN provider you use:
31
31
> info ""
32
32
> 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 for iOS](/docs/connections/sources/catalog/libraries/mobile/ios/#proxy-https-calls) and [Analytics for 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.
33
33
34
-
## Set up
34
+
## Custom Proxy Set up
35
35
36
36
There are 2 options you can choose from when you set up your custom domain proxy.
These instructions refer to Amazon CloudFront, but apply more generally to other providers as well.
120
120
@@ -166,3 +166,11 @@ To add a CNAME record to your DNS settings:
166
166
-**Value**: Tracking API CloudFront Distribution Domain Name
167
167
3. Save your record. This might take some time to take effect, depending on your TTL settings.
168
168
4. Run `curl` on your domain to check if the proxy is working correctly.
169
+
170
+
171
+
## Self Hosting Analytics.js
172
+
173
+
Follow the instructions at [Using Analytics.js as an NPM Package](https://github.com/segmentio/analytics-next/tree/master/packages/browser#-using-as-an-npm-package), to host Analytics.js and eliminate the requirement of downloading it from the CDN file during every page load. This enables you to self-host/import the library itself.
174
+
175
+
> warning "Keep in mind"
176
+
> Segment does not recommend self-hosting, as it requires that you configure integration settings individually and manually redeploy Analytics.js when there are changes to your settings. When you enable third-party libraries in device-mode, Segment loads them, which defeats the purpose of self-hosting. Self-hosting Analytics.js requires
0 commit comments