-
Notifications
You must be signed in to change notification settings - Fork 380
Custom Domains GA docs [DOC-980] #6834
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 6 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
6d34f6f
custom domain ga docs
forstisabella fbd1b74
an editing pass
forstisabella 761f1f4
reorganize sections [netlify-build]
forstisabella 876ece8
fixing nav issue [netlify-build]
forstisabella 804ce2a
more requested changes [netlify-build]
forstisabella 301f175
add initial pass of window.analytics q
forstisabella 8dcc224
Apply suggestions from code review
forstisabella b576975
making required updates [netlify-build]
forstisabella 4469a9e
add CNAME note [netlify-build]
forstisabella fc42bca
add'l changes [netlify-build]
forstisabella d6b6021
more edits!
forstisabella f6379a8
grammar [netlify-build]
forstisabella e97b599
[netlify-build]
forstisabella 84fcb8f
priscilla requested updates [netlify-build]
forstisabella ff12186
[netlify-build]
forstisabella a6d85cc
PMM-requested changes
forstisabella 4de1801
[netlify-build]
forstisabella 0ac6b8d
Apply suggestions from code review
forstisabella File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
--- | ||
title: Custom Domain | ||
plan: custom-domain | ||
hidden: true | ||
--- | ||
|
||
Custom Domain is a fully-managed service that enables you to configure a first-party subdomain over HTTPS to track event requests through your domain (for example, cdp.mydomain.com), instead of tracking events through Segment's default domain (segment.com). Tracking events through your domain lets you reclaim some of the first-party data lost to end user ad-blockers and browser privacy controls that block Segment's default domain. With complete first-party data comes a more complete view of your customer's behaviors, and can lead to more robust profiles, more accurate attribution, and, ultimately, greater ROAS. | ||
|
||
 | ||
|
||
> success "" | ||
> Segment recommends configuring Custom Domain alongside [Consent Management](/docs/privacy/consent-management/) to ensure you are respectful of your end users' consent preferences. | ||
|
||
## Compare Segment's domain delegation solutions | ||
|
||
Segment has two domain delegation solutions: | ||
- **Custom Domain**: Uses a DNS subdomain that you delegate to Segment | ||
- **[Custom Proxy](/docs/connections/sources/catalog/libraries/website/javascript/custom-proxy/)**: Uses a Canonical Name (CNAME) to map an alias name to a true or 'canonical' domain name. The CNAME record allows you to alias one domain name to another. You create a CNAME record to alias a subdomain that points to the Segment domain. | ||
|
||
### How DNS subdomain delegation works | ||
DNS subdomain delegation is a process where the control of a specific subdomain is assigned to another DNS server, allowing that server to manage the DNS records for the subdomain. This delegation is useful for distributing the management of DNS records and enables specialized handling of subdomain traffic. | ||
|
||
### How CNAME records work | ||
When a user tries to access the alias domain, the DNS resolver looks up the CNAME record, finds the canonical name, and resolves it to the IP address of the target. For example, you could alias your subdomain to point to the Segment domain. If a user accesses your site, they are redirected to the Segment domain, but their browser's address bar still shows the alias domain. | ||
|
||
CNAME records provide flexibility and centralized management, making it easier to handle domain redirections and subdomain configurations. | ||
|
||
### Benefits of Custom Domain over Custom Proxy | ||
- **Automatic SSL management**: Segment manages the SSL certificates for your subdomain, ensuring secure communication. | ||
- **Continuous monitoring**: Segment has security monitors in place, ensuring a quick responses to any issues. | ||
- **Easy setup**: Segment handles all DNS changes, so you have to complete minimal additional work. | ||
- **No maintenance**: Segment handles all ongoing infrastructure management. | ||
|
||
## Supported sources | ||
|
||
Custom Domain supports the following sources: | ||
- [Analytics.js](docs/connections/sources/catalog/libraries/website/javascript/) | ||
- [Clojure](/docs/connections/sources/catalog/libraries/server/clojure/) | ||
- [Go](/docs/connections/sources/catalog/libraries/server/go/) | ||
- [Java](/docs/connections/sources/catalog/libraries/server/java/) | ||
- [Node.js](/docs/connections/sources/catalog/libraries/server/node/) | ||
- [PHP](/docs/connections/sources/catalog/libraries/server/php/) | ||
- [Python](/docs/connections/sources/catalog/libraries/server/python/) | ||
- [Ruby](/docs/connections/sources/catalog/libraries/server/ruby/) | ||
- [.NET](/docs/connections/sources/catalog/libraries/server/net/) | ||
|
||
## Getting started | ||
|
||
> info "Custom Domain is only available to Business Tier customers" | ||
> Customers not on the Business Tier but who have interest in Custom Domain should [contact Segment's sales team](https://segment.com/demo/){:target="_blank”} for assistance with upgrading to a Business Tier plan. Segment also offers an alternative DNS record service, [Custom Proxy](/docs/connections/sources/catalog/libraries/website/javascript/custom-proxy/), which uses a Canonical Name (CNAME) and only works with Analytics.js sources. | ||
|
||
To configure Custom Domain: | ||
1. Select the subdomain you'd like Segment to use for event request tracking (for example, `cdp.domain.com`). | ||
2. Sign into the Segment app, select your user avatar, and click **Contact Support**. | ||
3. Create a support request with the following fields: | ||
- **Topic**: Select **Custom Domain**. | ||
- **Subject**: Enter a subject line for your support request. | ||
- **Domain Name**: Enter the subdomain that Segment should use for event request tracking. | ||
- **Additional Domain Name**: If applicable, add an additional subdomain. This field is optional. | ||
- **Source names**: Select the sources you would like to use for Custom Domain. For a list of all sources that support Custom Domain, see [Supported sources](#supported-sources). | ||
- **Is the domain name enabled for Content Policy**: Select either Yes or No. You are not required to create a Content Policy prior to requesting Custom Domain. | ||
- **Description**: Enter an optional description for your service request. If you are requesting Custom Domain for multiple workspaces, enter any additional workspace slugs and source names into this field. | ||
4. Segment provides you with a list of nameservers you should add to your DNS. Once you receive the nameservers from Segment, update your DNS. | ||
5. After you've updated your DNS, Segment verifies that you've made all required updates and then provides you with two custom domains, one for the Tracking API and a second for your CDN. | ||
6. Update your Javascript snippet to reference the new subdomains or use the new Tracking API custom domain as your endpoint for server library sources. | ||
forstisabella marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
## FAQ | ||
|
||
### What sources can I use with Custom Domain? | ||
Custom Domain was largely developed to support JavaScript sources. It helps with comprehensive collection of first-party data from your website when accessed over any platform (desktop, mobile, and more). You can use the subdomain for all other non-JavaScript sources as well, for consistency, but it will have no impact on data collection for those sources. | ||
|
||
Once Custom Domain is enabled for your workspace, the Segment app generates a new JavaScript source code snippet for you to copy-paste into the header of your website. For non-JavaScript sources, you can use the sub-domain as an endpoint when using the Tracking API. | ||
|
||
### Is this a fully-managed solution? What servers or infrastructure do I need to set up on my side for this proxy? | ||
Yes, Custom Domain is a fully-managed solution. | ||
|
||
You must be able to delegate a DNS subdomain to Segment and add the name servers Segment provides to your DNS. | ||
|
||
First, decide on your subdomain and then delegate it to Segment. Segment then asks you to add a DNS NS record to your DNS with specific values to complete the DNS delegation. From there on, Segment fully manages the infrastructure for serving Analytics.js and ingesting events data through the subdomain. | ||
|
||
### Can I change my Segment subdomain after the initial setup? | ||
Segment does not recommended that you change the subdomain after the initial setup. If you change the subdomain, Segment must revoke the older certificates for your subdomain and you will be required to redo the entire onboarding process, as several underlying components, like certificates, would need to be recreated and reassociated. | ||
|
||
### Who is responsible for managing the SSL certificate for the Custom Domain? | ||
Segment hosts and manages SSL Certificate on the Custom Domain. At this time, Segment does not support importing a certificate you may already have, as Segment must request a SSL certificate on your behalf using AWS Certificate Manager (ACM) when initially setting up your Custom Domain. | ||
|
||
Segment also uses AWS Certificate Manager (ACM) to manage and renew certificates. | ||
|
||
### Can you rename `window.analytics` with Custom Domain? | ||
Yes, Custom Domain allows Segment to rename `window.analytics` to a unique name to avoid being blocked by certain ad blocking software. | ||
|
||
Customers who have access to the Custom Domain feature can rename analytics to `<workspaceid>/<sourceid>.js` by choosing an Alias for analytics.js within the source settings that will be available after the workspace is enabled for Custom Domain: | ||
forstisabella marked this conversation as resolved.
Show resolved
Hide resolved
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.